mirror of
https://github.com/S3NEO/android_kernel_samsung_msm8226.git
synced 2024-11-07 03:47:13 +00:00
misc: fix some GCC warnings
This commit is contained in:
parent
04d3a6847d
commit
20b0da57d9
30 changed files with 53 additions and 38 deletions
|
@ -45,7 +45,7 @@ void *return_address(unsigned int);
|
|||
|
||||
#else
|
||||
|
||||
extern inline void *return_address(unsigned int level)
|
||||
static inline void *return_address(unsigned int level)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -56,13 +56,6 @@ void *return_address(unsigned int level)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
#else /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) */
|
||||
|
||||
void *return_address(unsigned int level)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) / else */
|
||||
|
||||
EXPORT_SYMBOL_GPL(return_address);
|
||||
|
|
|
@ -58,8 +58,8 @@
|
|||
#define SET_FIELD(addr, mask, shift, v) \
|
||||
do { \
|
||||
int t = readl_relaxed(addr); \
|
||||
writel_relaxed((t & ~((mask) << (shift))) + (((v) & \
|
||||
(mask)) << (shift)), addr); \
|
||||
writel_relaxed((t & ~(((u32) mask) << (shift))) + (((v) & \
|
||||
((u32) mask)) << (shift)), addr); \
|
||||
} while (0)
|
||||
|
||||
|
||||
|
|
|
@ -153,7 +153,7 @@ int apr_get_svc(const char *svc_name, int dest_id, int *client_id,
|
|||
void apr_cb_func(void *buf, int len, void *priv);
|
||||
struct apr_svc *apr_register(char *dest, char *svc_name, apr_fn svc_fn,
|
||||
uint32_t src_port, void *priv);
|
||||
inline int apr_fill_hdr(void *handle, uint32_t *buf, uint16_t src_port,
|
||||
int apr_fill_hdr(void *handle, uint32_t *buf, uint16_t src_port,
|
||||
uint16_t msg_type, uint16_t dest_port,
|
||||
uint32_t token, uint32_t opcode, uint16_t len);
|
||||
|
||||
|
|
|
@ -147,7 +147,7 @@ static int pil_msa_wait_for_mba_ready(struct q6v5_data *drv)
|
|||
|
||||
/* Wait for PBL completion. */
|
||||
ret = readl_poll_timeout(drv->rmb_base + RMB_PBL_STATUS, status,
|
||||
status != 0, POLL_INTERVAL_US, pbl_mba_boot_timeout_ms * 1000);
|
||||
status != 0, POLL_INTERVAL_US, pbl_mba_boot_timeout_ms && 1000);
|
||||
if (ret) {
|
||||
dev_err(dev, "PBL boot timed out\n");
|
||||
return ret;
|
||||
|
@ -159,7 +159,7 @@ static int pil_msa_wait_for_mba_ready(struct q6v5_data *drv)
|
|||
|
||||
/* Wait for MBA completion. */
|
||||
ret = readl_poll_timeout(drv->rmb_base + RMB_MBA_STATUS, status,
|
||||
status != 0, POLL_INTERVAL_US, pbl_mba_boot_timeout_ms * 1000);
|
||||
status != 0, POLL_INTERVAL_US, pbl_mba_boot_timeout_ms && 1000);
|
||||
if (ret) {
|
||||
dev_err(dev, "MBA boot timed out\n");
|
||||
return ret;
|
||||
|
@ -321,7 +321,7 @@ static int pil_msa_mba_init_image(struct pil_desc *pil,
|
|||
writel_relaxed(CMD_META_DATA_READY, drv->rmb_base + RMB_MBA_COMMAND);
|
||||
ret = readl_poll_timeout(drv->rmb_base + RMB_MBA_STATUS, status,
|
||||
status == STATUS_META_DATA_AUTH_SUCCESS || status < 0,
|
||||
POLL_INTERVAL_US, modem_auth_timeout_ms * 1000);
|
||||
POLL_INTERVAL_US, modem_auth_timeout_ms && 1000);
|
||||
if (ret) {
|
||||
dev_err(pil->dev, "MBA authentication of headers timed out\n");
|
||||
} else if (status < 0) {
|
||||
|
@ -369,7 +369,7 @@ static int pil_msa_mba_auth(struct pil_desc *pil)
|
|||
/* Wait for all segments to be authenticated or an error to occur */
|
||||
ret = readl_poll_timeout(drv->rmb_base + RMB_MBA_STATUS, status,
|
||||
status == STATUS_AUTH_COMPLETE || status < 0,
|
||||
50, modem_auth_timeout_ms * 1000);
|
||||
50, modem_auth_timeout_ms && 1000);
|
||||
if (ret) {
|
||||
dev_err(pil->dev, "MBA authentication of image timed out\n");
|
||||
} else if (status < 0) {
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
|
||||
EXTRA_CFLAGS += -Wno-array-bounds
|
||||
|
||||
ccflags-y := -Iinclude/uapi/drm -Iinclude/drm -Idrivers/gpu/msm
|
||||
|
||||
msm_kgsl_core-y = \
|
||||
|
|
|
@ -213,7 +213,7 @@ err:
|
|||
*
|
||||
* Load the pm4 ucode from @start at @addr.
|
||||
*/
|
||||
inline int adreno_ringbuffer_load_pm4_ucode(struct kgsl_device *device,
|
||||
static inline int adreno_ringbuffer_load_pm4_ucode(struct kgsl_device *device,
|
||||
unsigned int start, unsigned int end, unsigned int addr)
|
||||
{
|
||||
struct adreno_device *adreno_dev = ADRENO_DEVICE(device);
|
||||
|
@ -267,7 +267,7 @@ err:
|
|||
*
|
||||
* Load the pfp ucode from @start at @addr.
|
||||
*/
|
||||
inline int adreno_ringbuffer_load_pfp_ucode(struct kgsl_device *device,
|
||||
static inline int adreno_ringbuffer_load_pfp_ucode(struct kgsl_device *device,
|
||||
unsigned int start, unsigned int end, unsigned int addr)
|
||||
{
|
||||
struct adreno_device *adreno_dev = ADRENO_DEVICE(device);
|
||||
|
|
|
@ -997,7 +997,7 @@ static int kgsl_iommu_init_sync_lock(struct kgsl_mmu *mmu)
|
|||
*
|
||||
* Return - int - number of commands.
|
||||
*/
|
||||
inline unsigned int kgsl_iommu_sync_lock(struct kgsl_mmu *mmu,
|
||||
static inline unsigned int kgsl_iommu_sync_lock(struct kgsl_mmu *mmu,
|
||||
unsigned int *cmds)
|
||||
{
|
||||
struct kgsl_device *device = mmu->device;
|
||||
|
@ -1067,7 +1067,7 @@ inline unsigned int kgsl_iommu_sync_lock(struct kgsl_mmu *mmu,
|
|||
*
|
||||
* Return - int - number of commands.
|
||||
*/
|
||||
inline unsigned int kgsl_iommu_sync_unlock(struct kgsl_mmu *mmu,
|
||||
static inline unsigned int kgsl_iommu_sync_unlock(struct kgsl_mmu *mmu,
|
||||
unsigned int *cmds)
|
||||
{
|
||||
struct kgsl_device *device = mmu->device;
|
||||
|
|
|
@ -143,8 +143,8 @@ static int samsung_kbd_input_mapping(struct hid_device *hdev,
|
|||
usage->hid & HID_USAGE);
|
||||
|
||||
if (HID_UP_KEYBOARD == (usage->hid & HID_USAGE_PAGE)) {
|
||||
switch (usage->hid & HID_USAGE) {
|
||||
set_bit(EV_REP, hi->input->evbit);
|
||||
switch (usage->hid & HID_USAGE) {
|
||||
/* Only for UK keyboard */
|
||||
/* key found */
|
||||
#ifdef CONFIG_HID_KK_UPGRADE
|
||||
|
@ -276,8 +276,8 @@ static int samsung_universal_kbd_input_mapping(struct hid_device *hdev,
|
|||
usage->hid & HID_USAGE);
|
||||
|
||||
if (HID_UP_KEYBOARD == (usage->hid & HID_USAGE_PAGE)) {
|
||||
switch (usage->hid & HID_USAGE) {
|
||||
set_bit(EV_REP, hi->input->evbit);
|
||||
switch (usage->hid & HID_USAGE) {
|
||||
/* Only for UK keyboard */
|
||||
/* key found */
|
||||
#ifdef CONFIG_HID_KK_UPGRADE
|
||||
|
|
|
@ -144,8 +144,9 @@ static int zagg_kbd_input_mapping(struct hid_device *hdev,
|
|||
usage->hid & HID_USAGE);
|
||||
|
||||
if (HID_UP_KEYBOARD == (usage->hid & HID_USAGE_PAGE)) { // 0x00070000 == (0x???????? & 0XFFFF0000)
|
||||
switch (usage->hid & HID_USAGE) { // 0X0000FFFF --> PS/2 Set 1 Make
|
||||
set_bit(EV_REP, hi->input->evbit);
|
||||
switch (usage->hid & HID_USAGE) { // 0X0000FFFF --> PS/2 Set 1 Make
|
||||
|
||||
/* Only for UK keyboard */
|
||||
case 0x32: zagg_kbd_mouse_map_key_clear(KEY_BACKSLASH); break; // BACKSLASH
|
||||
case 0x64: zagg_kbd_mouse_map_key_clear(KEY_102ND); break; // PLUS
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
EXTRA_CFLAGS += -Wno-array-bounds
|
||||
ccflags-y += -Idrivers/media/platform/msm/camera_v2
|
||||
ccflags-y += -Idrivers/media/platform/msm/camera_v2/sensor/io
|
||||
obj-$(CONFIG_MSMB_CAMERA) += msm_isp.o msm_buf_mgr.o msm_isp_util.o msm_isp_axi_util.o msm_isp_stats_util.o
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
EXTRA_CFLAGS += -Wno-array-bounds
|
||||
ccflags-y += -Idrivers/media/platform/msm/camera_v2
|
||||
ccflags-y += -Idrivers/media/platform/msm/camera_v2/sensor/io
|
||||
obj-$(CONFIG_MSM_CSID) += msm_ispif.o
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#define JPEG_DEV_CNT 3
|
||||
#define JPEG_DEC_ID 2
|
||||
|
||||
inline void msm_jpeg_q_init(char const *name, struct msm_jpeg_q *q_p)
|
||||
static inline void msm_jpeg_q_init(char const *name, struct msm_jpeg_q *q_p)
|
||||
{
|
||||
JPEG_DBG("%s:%d] %s\n", __func__, __LINE__, name);
|
||||
q_p->name = name;
|
||||
|
@ -36,7 +36,7 @@ inline void msm_jpeg_q_init(char const *name, struct msm_jpeg_q *q_p)
|
|||
q_p->unblck = 0;
|
||||
}
|
||||
|
||||
inline void *msm_jpeg_q_out(struct msm_jpeg_q *q_p)
|
||||
static inline void *msm_jpeg_q_out(struct msm_jpeg_q *q_p)
|
||||
{
|
||||
unsigned long flags;
|
||||
struct msm_jpeg_q_entry *q_entry_p = NULL;
|
||||
|
@ -62,7 +62,7 @@ inline void *msm_jpeg_q_out(struct msm_jpeg_q *q_p)
|
|||
return data;
|
||||
}
|
||||
|
||||
inline int msm_jpeg_q_in(struct msm_jpeg_q *q_p, void *data)
|
||||
static inline int msm_jpeg_q_in(struct msm_jpeg_q *q_p, void *data)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
|
@ -84,7 +84,7 @@ inline int msm_jpeg_q_in(struct msm_jpeg_q *q_p, void *data)
|
|||
return 0;
|
||||
}
|
||||
|
||||
inline int msm_jpeg_q_in_buf(struct msm_jpeg_q *q_p,
|
||||
static inline int msm_jpeg_q_in_buf(struct msm_jpeg_q *q_p,
|
||||
struct msm_jpeg_core_buf *buf)
|
||||
{
|
||||
struct msm_jpeg_core_buf *buf_p;
|
||||
|
@ -102,7 +102,7 @@ inline int msm_jpeg_q_in_buf(struct msm_jpeg_q *q_p,
|
|||
return 0;
|
||||
}
|
||||
|
||||
inline int msm_jpeg_q_wait(struct msm_jpeg_q *q_p)
|
||||
static inline int msm_jpeg_q_wait(struct msm_jpeg_q *q_p)
|
||||
{
|
||||
int tm = MAX_SCHEDULE_TIMEOUT; /* 500ms */
|
||||
int rc;
|
||||
|
@ -145,7 +145,7 @@ inline int msm_jpeg_q_unblock(struct msm_jpeg_q *q_p)
|
|||
return 0;
|
||||
}
|
||||
|
||||
inline void msm_jpeg_outbuf_q_cleanup(struct msm_jpeg_device *pgmn_dev,
|
||||
static inline void msm_jpeg_outbuf_q_cleanup(struct msm_jpeg_device *pgmn_dev,
|
||||
struct msm_jpeg_q *q_p, int domain_num)
|
||||
{
|
||||
struct msm_jpeg_core_buf *buf_p;
|
||||
|
@ -162,7 +162,7 @@ inline void msm_jpeg_outbuf_q_cleanup(struct msm_jpeg_device *pgmn_dev,
|
|||
q_p->unblck = 0;
|
||||
}
|
||||
|
||||
inline void msm_jpeg_q_cleanup(struct msm_jpeg_q *q_p)
|
||||
static inline void msm_jpeg_q_cleanup(struct msm_jpeg_q *q_p)
|
||||
{
|
||||
void *data;
|
||||
JPEG_DBG("%s:%d] %s\n", __func__, __LINE__, q_p->name);
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
# Makefile for the video capture/playback device drivers.
|
||||
#
|
||||
|
||||
EXTRA_CFLAGS += -Wno-array-bounds
|
||||
|
||||
tuner-objs := tuner-core.o
|
||||
|
||||
msp3400-objs := msp3400-driver.o msp3400-kthreads.o
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
# Makefile for MMC/SD host controller drivers
|
||||
#
|
||||
|
||||
EXTRA_CFLAGS += -Wno-array-bounds
|
||||
|
||||
obj-$(CONFIG_MMC_ARMMMCI) += mmci.o
|
||||
obj-$(CONFIG_MMC_PXA) += pxamci.o
|
||||
obj-$(CONFIG_MMC_IMX) += imxmmc.o
|
||||
|
|
|
@ -857,7 +857,7 @@ static irqreturn_t qpnp_regulator_vs_ocp_isr(int irq, void *data)
|
|||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static const char const *qpnp_print_actions[] = {
|
||||
static const char *qpnp_print_actions[] = {
|
||||
[QPNP_REGULATOR_ACTION_INIT] = "initial ",
|
||||
[QPNP_REGULATOR_ACTION_ENABLE] = "enable ",
|
||||
[QPNP_REGULATOR_ACTION_DISABLE] = "disable ",
|
||||
|
|
|
@ -986,7 +986,7 @@ static eHalStatus hdd_wmm_sme_callback (tHalHandle hHal,
|
|||
VOS_TRACE( VOS_MODULE_ID_HDD, WMM_TRACE_LEVEL_ERROR,
|
||||
"%s: Setup failed, not a QoS AP",
|
||||
__func__);
|
||||
if (!HDD_WMM_HANDLE_IMPLICIT == pQosContext->handle)
|
||||
if (HDD_WMM_HANDLE_IMPLICIT != pQosContext->handle)
|
||||
{
|
||||
VOS_TRACE(VOS_MODULE_ID_HDD, WMM_TRACE_LEVEL_INFO,
|
||||
"%s: Explicit Qos, notifying userspace",
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
# We can build either as part of a standalone Kernel build or part
|
||||
# of an Android build. Determine which mechanism is being used
|
||||
|
||||
EXTRA_CFLAGS += -Wno-discarded-array-qualifiers
|
||||
|
||||
|
||||
ifeq ($(MODNAME),)
|
||||
KERNEL_BUILD := 1
|
||||
else
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
EXTRA_CFLAGS += -Wno-array-bounds
|
||||
mdss-mdp3-objs = mdp3.o mdp3_dma.o mdp3_ctrl.o dsi_status_v2.o
|
||||
ifeq ($(TARGET_BUILD_VARIANT),user)
|
||||
EXTRA_CFLAGS += -DDLOG_USER_VARIANT
|
||||
|
|
|
@ -463,7 +463,7 @@ static int mdss_mdp_video_wait4comp(struct mdss_mdp_ctl *ctl, void *arg)
|
|||
if (rc == 0) {
|
||||
pr_warn("vsync wait timeout %d, fallback to poll mode\n",
|
||||
ctl->num);
|
||||
ctx->polling_en++;
|
||||
ctx->polling_en=true;
|
||||
rc = mdss_mdp_video_pollwait(ctl);
|
||||
} else {
|
||||
rc = 0;
|
||||
|
|
|
@ -4404,7 +4404,7 @@ int mdss_mdp_ad_input(struct msm_fb_data_type *mfd,
|
|||
mutex_lock(&ad->lock);
|
||||
if ((!PP_AD_STATE_IS_INITCFG(ad->state) &&
|
||||
!PP_AD_STS_IS_DIRTY(ad->sts)) &&
|
||||
!input->mode == MDSS_AD_MODE_CALIB) {
|
||||
input->mode != MDSS_AD_MODE_CALIB) {
|
||||
pr_warn("AD not initialized or configured.");
|
||||
ret = -EPERM;
|
||||
goto error;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#
|
||||
# Makefile for the Linux fat filesystem support.
|
||||
#
|
||||
EXTRA_CFLAGS += -Wno-array-bounds
|
||||
|
||||
obj-$(CONFIG_FAT_FS) += fat.o
|
||||
obj-$(CONFIG_VFAT_FS) += vfat.o
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
# Makefile for the linux memory manager.
|
||||
#
|
||||
|
||||
EXTRA_CFLAGS += -Wno-array-bounds
|
||||
|
||||
mmu-y := nommu.o
|
||||
mmu-$(CONFIG_MMU) := fremap.o highmem.o madvise.o memory.o mincore.o \
|
||||
mlock.o mmap.o mprotect.o mremap.o msync.o rmap.o \
|
||||
|
|
|
@ -613,7 +613,7 @@ void page_unlock_anon_vma(struct anon_vma *anon_vma)
|
|||
* Returns virtual address or -EFAULT if page's index/offset is not
|
||||
* within the range mapped the @vma.
|
||||
*/
|
||||
inline unsigned long
|
||||
static inline unsigned long
|
||||
vma_address(struct page *page, struct vm_area_struct *vma)
|
||||
{
|
||||
pgoff_t pgoff = page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT);
|
||||
|
|
0
scripts/mkcompile_h
Executable file → Normal file
0
scripts/mkcompile_h
Executable file → Normal file
|
@ -1,3 +1,5 @@
|
|||
EXTRA_CFLAGS += -Wno-discarded-array-qualifiers
|
||||
|
||||
snd-soc-88pm860x-objs := 88pm860x-codec.o
|
||||
snd-soc-ac97-objs := ac97.o
|
||||
snd-soc-ad1836-objs := ad1836.o
|
||||
|
|
|
@ -3447,7 +3447,7 @@ static const char * const slim0_rx_vi_fb_tx_lch_mux_text[] = {
|
|||
"ZERO", "SLIM4_TX"
|
||||
};
|
||||
|
||||
static const int const slim0_rx_vi_fb_tx_lch_value[] = {
|
||||
static const int slim0_rx_vi_fb_tx_lch_value[] = {
|
||||
MSM_BACKEND_DAI_MAX, MSM_BACKEND_DAI_SLIMBUS_4_TX
|
||||
};
|
||||
static const struct soc_enum slim0_rx_vi_fb_lch_mux_enum =
|
||||
|
|
|
@ -541,7 +541,7 @@ static int msm_roaming_get(struct snd_kcontrol *kcontrol,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const char const *tty_mode[] = {"OFF", "HCO", "VCO", "FULL"};
|
||||
static const char *tty_mode[] = {"OFF", "HCO", "VCO", "FULL"};
|
||||
static const struct soc_enum msm_tty_mode_enum[] = {
|
||||
SOC_ENUM_SINGLE_EXT(4, tty_mode),
|
||||
};
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
# Makefile for ALSA
|
||||
#
|
||||
|
||||
EXTRA_CFLAGS += -Wno-array-bounds
|
||||
|
||||
snd-usb-audio-objs := card.o \
|
||||
clock.o \
|
||||
endpoint.o \
|
||||
|
|
Loading…
Reference in a new issue