* [PATCH RESEND 00/16] some compiler warning fixes
@ 2012-01-30 22:00 Danny Kukawka
2012-01-30 22:00 ` [PATCH 01/16] eicon: fix -Warray-bounds warning Danny Kukawka
` (14 more replies)
0 siblings, 15 replies; 33+ messages in thread
From: Danny Kukawka @ 2012-01-30 22:00 UTC (permalink / raw)
To: linux-kernel
Resend due to problems with suppressed CC list and misconfigured
git-send-email. Sorry.
For some of the patches I send new reworked/fixed versions (v2)
with this series.
Danny Kukawka (16):
eicon: fix -Warray-bounds warning
max2165: trival fix for some -Wuninitialized warning
mmc: fix for some -Wuninitialized warning
vmw_balloon: fix for a -Wuninitialized warning
cx18: fix handling of 'radio' module parameter
cpcihp: fix debug module parameter to be bool
hdaps: trivial fix for -Wuninitialized
ivtv-driver: fix handling of 'radio' module parameter
[RFC] aic94xx: fix for -Wuninitialized
ixj: fix Wsequence-point compiler warnings
ath5k: make ath5k_modparam_no_hw_rfkill_switch real
kobil_sct: fix debug module parameter to be bool
riva/fbdev: fix several -Wuninitialized
hamradio: fix incompatible pointer in module parameter
leds-lp5521: fix compiler warning
leds-lp5523: fix compiler warning
drivers/isdn/hardware/eicon/capi20.h | 2 +-
drivers/leds/leds-lp5521.c | 14 ++-
drivers/leds/leds-lp5523.c | 17 ++-
drivers/media/common/tuners/max2165.c | 9 +-
drivers/media/video/cx18/cx18-driver.c | 2 +-
drivers/media/video/ivtv/ivtv-driver.c | 4 +-
drivers/misc/vmw_balloon.c | 14 +-
drivers/mmc/card/block.c | 3 +-
drivers/net/hamradio/baycom_epp.c | 2 +-
drivers/net/hamradio/baycom_par.c | 2 +-
drivers/net/wireless/ath/ath5k/base.c | 2 +-
drivers/pci/hotplug/cpcihp_generic.c | 2 +-
drivers/platform/x86/hdaps.c | 4 +-
drivers/scsi/aic94xx/aic94xx_sds.c | 2 +-
drivers/telephony/ixj.c | 194 ++++++++++++++++++--------------
drivers/usb/serial/kobil_sct.c | 2 +-
drivers/video/riva/fbdev.c | 5 +-
17 files changed, 161 insertions(+), 119 deletions(-)
--
1.7.7.3
^ permalink raw reply [flat|nested] 33+ messages in thread
* [PATCH 01/16] eicon: fix -Warray-bounds warning
2012-01-30 22:00 [PATCH RESEND 00/16] some compiler warning fixes Danny Kukawka
@ 2012-01-30 22:00 ` Danny Kukawka
2012-01-30 23:09 ` Ben Hutchings
2012-01-30 22:00 ` [PATCH v2 02/16] max2165: trival fix for some -Wuninitialized warning Danny Kukawka
` (13 subsequent siblings)
14 siblings, 1 reply; 33+ messages in thread
From: Danny Kukawka @ 2012-01-30 22:00 UTC (permalink / raw)
To: Armin Schindler; +Cc: linux-kernel, netdev, Karsten Keil
Fix for a -Warray-bounds warning. mixer_notify_update() tries to
write to ((CAPI_MSG *) msg)->info.facility_req.structs[3] while
structs is defined as byte structs[1], define structs[1] as
structs[4].
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
---
drivers/isdn/hardware/eicon/capi20.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/isdn/hardware/eicon/capi20.h b/drivers/isdn/hardware/eicon/capi20.h
index 7ebcccd..f9170ad 100644
--- a/drivers/isdn/hardware/eicon/capi20.h
+++ b/drivers/isdn/hardware/eicon/capi20.h
@@ -226,7 +226,7 @@ typedef struct {
/* FACILITY-REQUEST */
typedef struct {
word Selector;
- byte structs[1]; /* Facility parameters */
+ byte structs[4]; /* Facility parameters */
} _FAC_REQP;
/* FACILITY-CONFIRM STRUCT FOR SUPPLEMENT. SERVICES */
typedef struct {
--
1.7.7.3
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH v2 02/16] max2165: trival fix for some -Wuninitialized warning
2012-01-30 22:00 [PATCH RESEND 00/16] some compiler warning fixes Danny Kukawka
2012-01-30 22:00 ` [PATCH 01/16] eicon: fix -Warray-bounds warning Danny Kukawka
@ 2012-01-30 22:00 ` Danny Kukawka
2012-01-30 22:00 ` [PATCH v2 03/16] mmc: " Danny Kukawka
` (12 subsequent siblings)
14 siblings, 0 replies; 33+ messages in thread
From: Danny Kukawka @ 2012-01-30 22:00 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-media, linux-kernel
Fix for some -Wuninitialized compiler warnings.
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
---
drivers/media/common/tuners/max2165.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/media/common/tuners/max2165.c b/drivers/media/common/tuners/max2165.c
index cb2c98f..ba84936 100644
--- a/drivers/media/common/tuners/max2165.c
+++ b/drivers/media/common/tuners/max2165.c
@@ -168,7 +168,7 @@ int fixpt_div32(u32 dividend, u32 divisor, u32 *quotient, u32 *fraction)
int i;
if (0 == divisor)
- return -1;
+ return -EINVAL;
q = dividend / divisor;
remainder = dividend - q * divisor;
@@ -194,10 +194,13 @@ static int max2165_set_rf(struct max2165_priv *priv, u32 freq)
u8 tf_ntch;
u32 t;
u32 quotient, fraction;
+ int ret;
/* Set PLL divider according to RF frequency */
- fixpt_div32(freq / 1000, priv->config->osc_clk * 1000,
- "ient, &fraction);
+ ret = fixpt_div32(freq / 1000, priv->config->osc_clk * 1000,
+ "ient, &fraction);
+ if (ret != 0)
+ return ret;
/* 20-bit fraction */
fraction >>= 12;
--
1.7.7.3
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH v2 03/16] mmc: fix for some -Wuninitialized warning
2012-01-30 22:00 [PATCH RESEND 00/16] some compiler warning fixes Danny Kukawka
2012-01-30 22:00 ` [PATCH 01/16] eicon: fix -Warray-bounds warning Danny Kukawka
2012-01-30 22:00 ` [PATCH v2 02/16] max2165: trival fix for some -Wuninitialized warning Danny Kukawka
@ 2012-01-30 22:00 ` Danny Kukawka
2012-01-30 22:00 ` [PATCH 05/16] cx18: fix handling of 'radio' module parameter Danny Kukawka
` (11 subsequent siblings)
14 siblings, 0 replies; 33+ messages in thread
From: Danny Kukawka @ 2012-01-30 22:00 UTC (permalink / raw)
To: Chris Ball; +Cc: linux-kernel, linux-mmc
Fix for some -Wuninitialized compiler warnings, by moving the
retry block up so that from, nr and arg variables get set correctly
if the code jumps from the out-block.
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
---
drivers/mmc/card/block.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index 0cad48a..c9350ae 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -889,6 +889,7 @@ static int mmc_blk_issue_secdiscard_rq(struct mmc_queue *mq,
goto out;
}
+retry:
from = blk_rq_pos(req);
nr = blk_rq_sectors(req);
@@ -896,7 +897,7 @@ static int mmc_blk_issue_secdiscard_rq(struct mmc_queue *mq,
arg = MMC_SECURE_TRIM1_ARG;
else
arg = MMC_SECURE_ERASE_ARG;
-retry:
+
if (card->quirks & MMC_QUIRK_INAND_CMD38) {
err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
INAND_CMD38_ARG_EXT_CSD,
--
1.7.7.3
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH 05/16] cx18: fix handling of 'radio' module parameter
2012-01-30 22:00 [PATCH RESEND 00/16] some compiler warning fixes Danny Kukawka
` (2 preceding siblings ...)
2012-01-30 22:00 ` [PATCH v2 03/16] mmc: " Danny Kukawka
@ 2012-01-30 22:00 ` Danny Kukawka
2012-01-31 13:45 ` Danny Kukawka
2012-01-30 22:00 ` [PATCH 06/16] cpcihp: fix debug module parameter to be bool Danny Kukawka
` (10 subsequent siblings)
14 siblings, 1 reply; 33+ messages in thread
From: Danny Kukawka @ 2012-01-30 22:00 UTC (permalink / raw)
To: Andy Walls; +Cc: Mauro Carvalho Chehab, ivtv-devel, linux-media, linux-kernel
Fixed handling of 'radio' module parameter from module_param_array
to module_param_named to fix these compiler warnings in cx18-driver.c:
In function ‘__check_radio’:
113:1: warning: return from incompatible pointer type [enabled by default]
At top level:
113:1: warning: initialization from incompatible pointer type [enabled by default]
113:1: warning: (near initialization for ‘__param_arr_radio.num’) [enabled by default]
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
---
drivers/media/video/cx18/cx18-driver.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/media/video/cx18/cx18-driver.c b/drivers/media/video/cx18/cx18-driver.c
index 349bd9c..27b5330 100644
--- a/drivers/media/video/cx18/cx18-driver.c
+++ b/drivers/media/video/cx18/cx18-driver.c
@@ -110,7 +110,7 @@ static int retry_mmio = 1;
int cx18_debug;
module_param_array(tuner, int, &tuner_c, 0644);
-module_param_array(radio, bool, &radio_c, 0644);
+module_param_named(radio, radio_c, bool, 0644);
module_param_array(cardtype, int, &cardtype_c, 0644);
module_param_string(pal, pal, sizeof(pal), 0644);
module_param_string(secam, secam, sizeof(secam), 0644);
--
1.7.7.3
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH 06/16] cpcihp: fix debug module parameter to be bool
2012-01-30 22:00 [PATCH RESEND 00/16] some compiler warning fixes Danny Kukawka
` (3 preceding siblings ...)
2012-01-30 22:00 ` [PATCH 05/16] cx18: fix handling of 'radio' module parameter Danny Kukawka
@ 2012-01-30 22:00 ` Danny Kukawka
2012-02-03 0:06 ` Scott Murray
2012-02-10 19:40 ` Jesse Barnes
2012-01-30 22:00 ` [PATCH v2 07/16] hdaps: trivial fix for -Wuninitialized Danny Kukawka
` (9 subsequent siblings)
14 siblings, 2 replies; 33+ messages in thread
From: Danny Kukawka @ 2012-01-30 22:00 UTC (permalink / raw)
To: Scott Murray; +Cc: Jesse Barnes, linux-pci, linux-kernel
Fix debug variable from module parameter to be really bool to
fix 'warning: return from incompatible pointer type'.
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
---
drivers/pci/hotplug/cpcihp_generic.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/pci/hotplug/cpcihp_generic.c b/drivers/pci/hotplug/cpcihp_generic.c
index fb3f846..81af764 100644
--- a/drivers/pci/hotplug/cpcihp_generic.c
+++ b/drivers/pci/hotplug/cpcihp_generic.c
@@ -62,7 +62,7 @@
#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME , ## arg)
/* local variables */
-static int debug;
+static bool debug;
static char *bridge;
static u8 bridge_busnr;
static u8 bridge_slot;
--
1.7.7.3
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH v2 07/16] hdaps: trivial fix for -Wuninitialized
2012-01-30 22:00 [PATCH RESEND 00/16] some compiler warning fixes Danny Kukawka
` (4 preceding siblings ...)
2012-01-30 22:00 ` [PATCH 06/16] cpcihp: fix debug module parameter to be bool Danny Kukawka
@ 2012-01-30 22:00 ` Danny Kukawka
2012-01-30 22:00 ` [PATCH 09/16] [RFC] aic94xx: " Danny Kukawka
` (8 subsequent siblings)
14 siblings, 0 replies; 33+ messages in thread
From: Danny Kukawka @ 2012-01-30 22:00 UTC (permalink / raw)
To: Frank Seidel
Cc: Matthew Garrett, Jiri Kosina, platform-driver-x86, linux-kernel
Trivial fix for some -Wuninitialized compiler warnings.
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
---
drivers/platform/x86/hdaps.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/x86/hdaps.c b/drivers/platform/x86/hdaps.c
index 5a34973..ba68d4e 100644
--- a/drivers/platform/x86/hdaps.c
+++ b/drivers/platform/x86/hdaps.c
@@ -379,7 +379,7 @@ static ssize_t hdaps_temp1_show(struct device *dev,
int ret;
ret = hdaps_readb_one(HDAPS_PORT_TEMP1, &temp);
- if (ret < 0)
+ if (ret)
return ret;
return sprintf(buf, "%u\n", temp);
@@ -392,7 +392,7 @@ static ssize_t hdaps_temp2_show(struct device *dev,
int ret;
ret = hdaps_readb_one(HDAPS_PORT_TEMP2, &temp);
- if (ret < 0)
+ if (ret)
return ret;
return sprintf(buf, "%u\n", temp);
--
1.7.7.3
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH 09/16] [RFC] aic94xx: fix for -Wuninitialized
2012-01-30 22:00 [PATCH RESEND 00/16] some compiler warning fixes Danny Kukawka
` (5 preceding siblings ...)
2012-01-30 22:00 ` [PATCH v2 07/16] hdaps: trivial fix for -Wuninitialized Danny Kukawka
@ 2012-01-30 22:00 ` Danny Kukawka
2012-01-30 22:00 ` [PATCH 10/16] ixj: fix Wsequence-point compiler warnings Danny Kukawka
` (7 subsequent siblings)
14 siblings, 0 replies; 33+ messages in thread
From: Danny Kukawka @ 2012-01-30 22:00 UTC (permalink / raw)
To: James E.J. Bottomley; +Cc: Jiri Kosina, linux-scsi, linux-kernel
Fix for a -Wuninitialized warning. Not complete sure if this is the
correct fix since setting offs=0 is may not correct, but in case
asd_find_flash_de() fails in asd_process_ctrl_a_user() offs never
get set, but will be used later uninitialized in asd_read_flash_seg().
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
---
drivers/scsi/aic94xx/aic94xx_sds.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/aic94xx/aic94xx_sds.c b/drivers/scsi/aic94xx/aic94xx_sds.c
index edb43fd..6f6a5b8 100644
--- a/drivers/scsi/aic94xx/aic94xx_sds.c
+++ b/drivers/scsi/aic94xx/aic94xx_sds.c
@@ -982,7 +982,7 @@ static int asd_process_ctrl_a_user(struct asd_ha_struct *asd_ha,
struct asd_flash_dir *flash_dir)
{
int err, i;
- u32 offs, size;
+ u32 offs = 0, size;
struct asd_ll_el *el;
struct asd_ctrla_phy_settings *ps;
struct asd_ctrla_phy_settings dflt_ps;
--
1.7.7.3
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH 10/16] ixj: fix Wsequence-point compiler warnings
2012-01-30 22:00 [PATCH RESEND 00/16] some compiler warning fixes Danny Kukawka
` (6 preceding siblings ...)
2012-01-30 22:00 ` [PATCH 09/16] [RFC] aic94xx: " Danny Kukawka
@ 2012-01-30 22:00 ` Danny Kukawka
2012-01-30 22:00 ` [PATCH 11/16] ath5k: make ath5k_modparam_no_hw_rfkill_switch real Danny Kukawka
` (6 subsequent siblings)
14 siblings, 0 replies; 33+ messages in thread
From: Danny Kukawka @ 2012-01-30 22:00 UTC (permalink / raw)
To: linux-kernel; +Cc: Ed Okerson, Lucas De Marchi
Fix some Wsequence-point compiler warnings in ixj.
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
---
drivers/telephony/ixj.c | 194 ++++++++++++++++++++++++++---------------------
1 files changed, 107 insertions(+), 87 deletions(-)
diff --git a/drivers/telephony/ixj.c b/drivers/telephony/ixj.c
index d5f923b..7d02cae 100644
--- a/drivers/telephony/ixj.c
+++ b/drivers/telephony/ixj.c
@@ -5923,35 +5923,38 @@ static int ixj_build_filter_cadence(IXJ *j, IXJ_FILTER_CADENCE __user * cp)
static void add_caps(IXJ *j)
{
- j->caps = 0;
- j->caplist[j->caps].cap = PHONE_VENDOR_QUICKNET;
- strcpy(j->caplist[j->caps].desc, "Quicknet Technologies, Inc. (www.quicknet.net)");
- j->caplist[j->caps].captype = vendor;
- j->caplist[j->caps].handle = j->caps++;
- j->caplist[j->caps].captype = device;
+ int i = 0;
+ j->caplist[i].cap = PHONE_VENDOR_QUICKNET;
+ strcpy(j->caplist[i].desc, "Quicknet Technologies, Inc. (www.quicknet.net)");
+ j->caplist[i].captype = vendor;
+ j->caplist[i].handle = i;
+ i++;
+ j->caplist[i].captype = device;
switch (j->cardtype) {
case QTI_PHONEJACK:
- strcpy(j->caplist[j->caps].desc, "Quicknet Internet PhoneJACK");
+ strcpy(j->caplist[i].desc, "Quicknet Internet PhoneJACK");
break;
case QTI_LINEJACK:
- strcpy(j->caplist[j->caps].desc, "Quicknet Internet LineJACK");
+ strcpy(j->caplist[i].desc, "Quicknet Internet LineJACK");
break;
case QTI_PHONEJACK_LITE:
- strcpy(j->caplist[j->caps].desc, "Quicknet Internet PhoneJACK Lite");
+ strcpy(j->caplist[i].desc, "Quicknet Internet PhoneJACK Lite");
break;
case QTI_PHONEJACK_PCI:
- strcpy(j->caplist[j->caps].desc, "Quicknet Internet PhoneJACK PCI");
+ strcpy(j->caplist[i].desc, "Quicknet Internet PhoneJACK PCI");
break;
case QTI_PHONECARD:
- strcpy(j->caplist[j->caps].desc, "Quicknet Internet PhoneCARD");
+ strcpy(j->caplist[i].desc, "Quicknet Internet PhoneCARD");
break;
}
- j->caplist[j->caps].cap = j->cardtype;
- j->caplist[j->caps].handle = j->caps++;
- strcpy(j->caplist[j->caps].desc, "POTS");
- j->caplist[j->caps].captype = port;
- j->caplist[j->caps].cap = pots;
- j->caplist[j->caps].handle = j->caps++;
+ j->caplist[i].cap = j->cardtype;
+ j->caplist[i].handle = i;
+ i++;
+ strcpy(j->caplist[i].desc, "POTS");
+ j->caplist[i].captype = port;
+ j->caplist[i].cap = pots;
+ j->caplist[i].handle = i;
+ i++;
/* add devices that can do speaker/mic */
switch (j->cardtype) {
@@ -5959,10 +5962,11 @@ static void add_caps(IXJ *j)
case QTI_LINEJACK:
case QTI_PHONEJACK_PCI:
case QTI_PHONECARD:
- strcpy(j->caplist[j->caps].desc, "SPEAKER");
- j->caplist[j->caps].captype = port;
- j->caplist[j->caps].cap = speaker;
- j->caplist[j->caps].handle = j->caps++;
+ strcpy(j->caplist[i].desc, "SPEAKER");
+ j->caplist[i].captype = port;
+ j->caplist[i].cap = speaker;
+ j->caplist[i].handle = i;
+ i++;
default:
break;
}
@@ -5970,10 +5974,11 @@ static void add_caps(IXJ *j)
/* add devices that can do handset */
switch (j->cardtype) {
case QTI_PHONEJACK:
- strcpy(j->caplist[j->caps].desc, "HANDSET");
- j->caplist[j->caps].captype = port;
- j->caplist[j->caps].cap = handset;
- j->caplist[j->caps].handle = j->caps++;
+ strcpy(j->caplist[i].desc, "HANDSET");
+ j->caplist[i].captype = port;
+ j->caplist[i].cap = handset;
+ j->caplist[i].handle = i;
+ i++;
break;
default:
break;
@@ -5982,94 +5987,109 @@ static void add_caps(IXJ *j)
/* add devices that can do PSTN */
switch (j->cardtype) {
case QTI_LINEJACK:
- strcpy(j->caplist[j->caps].desc, "PSTN");
- j->caplist[j->caps].captype = port;
- j->caplist[j->caps].cap = pstn;
- j->caplist[j->caps].handle = j->caps++;
+ strcpy(j->caplist[i].desc, "PSTN");
+ j->caplist[i].captype = port;
+ j->caplist[i].cap = pstn;
+ j->caplist[i].handle = i;
+ i++;
break;
default:
break;
}
/* add codecs - all cards can do uLaw, linear 8/16, and Windows sound system */
- strcpy(j->caplist[j->caps].desc, "ULAW");
- j->caplist[j->caps].captype = codec;
- j->caplist[j->caps].cap = ULAW;
- j->caplist[j->caps].handle = j->caps++;
-
- strcpy(j->caplist[j->caps].desc, "LINEAR 16 bit");
- j->caplist[j->caps].captype = codec;
- j->caplist[j->caps].cap = LINEAR16;
- j->caplist[j->caps].handle = j->caps++;
-
- strcpy(j->caplist[j->caps].desc, "LINEAR 8 bit");
- j->caplist[j->caps].captype = codec;
- j->caplist[j->caps].cap = LINEAR8;
- j->caplist[j->caps].handle = j->caps++;
-
- strcpy(j->caplist[j->caps].desc, "Windows Sound System");
- j->caplist[j->caps].captype = codec;
- j->caplist[j->caps].cap = WSS;
- j->caplist[j->caps].handle = j->caps++;
+ strcpy(j->caplist[i].desc, "ULAW");
+ j->caplist[i].captype = codec;
+ j->caplist[i].cap = ULAW;
+ j->caplist[i].handle = i;
+ i++;
+
+ strcpy(j->caplist[i].desc, "LINEAR 16 bit");
+ j->caplist[i].captype = codec;
+ j->caplist[i].cap = LINEAR16;
+ j->caplist[i].handle = i;
+ i++;
+
+ strcpy(j->caplist[i].desc, "LINEAR 8 bit");
+ j->caplist[i].captype = codec;
+ j->caplist[i].cap = LINEAR8;
+ j->caplist[i].handle = i;
+ i++;
+
+ strcpy(j->caplist[i].desc, "Windows Sound System");
+ j->caplist[i].captype = codec;
+ j->caplist[i].cap = WSS;
+ j->caplist[i].handle = i;
+ i++;
/* software ALAW codec, made from ULAW */
- strcpy(j->caplist[j->caps].desc, "ALAW");
- j->caplist[j->caps].captype = codec;
- j->caplist[j->caps].cap = ALAW;
- j->caplist[j->caps].handle = j->caps++;
+ strcpy(j->caplist[i].desc, "ALAW");
+ j->caplist[i].captype = codec;
+ j->caplist[i].cap = ALAW;
+ j->caplist[i].handle = i;
+ i++;
/* version 12 of the 8020 does the following codecs in a broken way */
if (j->dsp.low != 0x20 || j->ver.low != 0x12) {
- strcpy(j->caplist[j->caps].desc, "G.723.1 6.3kbps");
- j->caplist[j->caps].captype = codec;
- j->caplist[j->caps].cap = G723_63;
- j->caplist[j->caps].handle = j->caps++;
-
- strcpy(j->caplist[j->caps].desc, "G.723.1 5.3kbps");
- j->caplist[j->caps].captype = codec;
- j->caplist[j->caps].cap = G723_53;
- j->caplist[j->caps].handle = j->caps++;
-
- strcpy(j->caplist[j->caps].desc, "TrueSpeech 4.8kbps");
- j->caplist[j->caps].captype = codec;
- j->caplist[j->caps].cap = TS48;
- j->caplist[j->caps].handle = j->caps++;
-
- strcpy(j->caplist[j->caps].desc, "TrueSpeech 4.1kbps");
- j->caplist[j->caps].captype = codec;
- j->caplist[j->caps].cap = TS41;
- j->caplist[j->caps].handle = j->caps++;
+ strcpy(j->caplist[i].desc, "G.723.1 6.3kbps");
+ j->caplist[i].captype = codec;
+ j->caplist[i].cap = G723_63;
+ j->caplist[i].handle = i;
+ i++;
+
+ strcpy(j->caplist[i].desc, "G.723.1 5.3kbps");
+ j->caplist[i].captype = codec;
+ j->caplist[i].cap = G723_53;
+ j->caplist[i].handle = i;
+ i++;
+
+ strcpy(j->caplist[i].desc, "TrueSpeech 4.8kbps");
+ j->caplist[i].captype = codec;
+ j->caplist[i].cap = TS48;
+ j->caplist[i].handle = i;
+ i++;
+
+ strcpy(j->caplist[i].desc, "TrueSpeech 4.1kbps");
+ j->caplist[i].captype = codec;
+ j->caplist[i].cap = TS41;
+ j->caplist[i].handle = i;
+ i++;
}
/* 8020 chips can do TS8.5 native, and 8021/8022 can load it */
if (j->dsp.low == 0x20 || j->flags.ts85_loaded) {
- strcpy(j->caplist[j->caps].desc, "TrueSpeech 8.5kbps");
- j->caplist[j->caps].captype = codec;
- j->caplist[j->caps].cap = TS85;
- j->caplist[j->caps].handle = j->caps++;
+ strcpy(j->caplist[i].desc, "TrueSpeech 8.5kbps");
+ j->caplist[i].captype = codec;
+ j->caplist[i].cap = TS85;
+ j->caplist[i].handle = i;
+ i++;
}
/* 8021 chips can do G728 */
if (j->dsp.low == 0x21) {
- strcpy(j->caplist[j->caps].desc, "G.728 16kbps");
- j->caplist[j->caps].captype = codec;
- j->caplist[j->caps].cap = G728;
- j->caplist[j->caps].handle = j->caps++;
+ strcpy(j->caplist[i].desc, "G.728 16kbps");
+ j->caplist[i].captype = codec;
+ j->caplist[i].cap = G728;
+ j->caplist[i].handle = i;
+ i++;
}
/* 8021/8022 chips can do G729 if loaded */
if (j->dsp.low != 0x20 && j->flags.g729_loaded) {
- strcpy(j->caplist[j->caps].desc, "G.729A 8kbps");
- j->caplist[j->caps].captype = codec;
- j->caplist[j->caps].cap = G729;
- j->caplist[j->caps].handle = j->caps++;
+ strcpy(j->caplist[i].desc, "G.729A 8kbps");
+ j->caplist[i].captype = codec;
+ j->caplist[i].cap = G729;
+ j->caplist[i].handle = i;
+ i++;
}
if (j->dsp.low != 0x20 && j->flags.g729_loaded) {
- strcpy(j->caplist[j->caps].desc, "G.729B 8kbps");
- j->caplist[j->caps].captype = codec;
- j->caplist[j->caps].cap = G729B;
- j->caplist[j->caps].handle = j->caps++;
+ strcpy(j->caplist[i].desc, "G.729B 8kbps");
+ j->caplist[i].captype = codec;
+ j->caplist[i].cap = G729B;
+ j->caplist[i].handle = i;
+ i++;
}
+ j->caps = i;
}
static int capabilities_check(IXJ *j, struct phone_capability *pcreq)
--
1.7.7.3
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH 11/16] ath5k: make ath5k_modparam_no_hw_rfkill_switch real
2012-01-30 22:00 [PATCH RESEND 00/16] some compiler warning fixes Danny Kukawka
` (7 preceding siblings ...)
2012-01-30 22:00 ` [PATCH 10/16] ixj: fix Wsequence-point compiler warnings Danny Kukawka
@ 2012-01-30 22:00 ` Danny Kukawka
2012-01-30 22:11 ` Jiri Slaby
2012-01-30 22:00 ` [PATCH 12/16] kobil_sct: fix debug module parameter to be bool Danny Kukawka
` (5 subsequent siblings)
14 siblings, 1 reply; 33+ messages in thread
From: Danny Kukawka @ 2012-01-30 22:00 UTC (permalink / raw)
To: ath5k-devel
Cc: Jiri Slaby, Nick Kossifidis, Luis R. Rodriguez, Bob Copeland,
John W. Linville, linux-wireless, netdev, linux-kernel
Make ath5k_modparam_no_hw_rfkill_switch real bool to fix:
'warning: return from incompatible pointer type' compiler warning.
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
---
drivers/net/wireless/ath/ath5k/base.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index d366dad..ad2f115 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -80,7 +80,7 @@ static bool modparam_fastchanswitch;
module_param_named(fastchanswitch, modparam_fastchanswitch, bool, S_IRUGO);
MODULE_PARM_DESC(fastchanswitch, "Enable fast channel switching for AR2413/AR5413 radios.");
-static int ath5k_modparam_no_hw_rfkill_switch;
+static bool ath5k_modparam_no_hw_rfkill_switch;
module_param_named(no_hw_rfkill_switch, ath5k_modparam_no_hw_rfkill_switch,
bool, S_IRUGO);
MODULE_PARM_DESC(no_hw_rfkill_switch, "Ignore the GPIO RFKill switch state");
--
1.7.7.3
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH 12/16] kobil_sct: fix debug module parameter to be bool
2012-01-30 22:00 [PATCH RESEND 00/16] some compiler warning fixes Danny Kukawka
` (8 preceding siblings ...)
2012-01-30 22:00 ` [PATCH 11/16] ath5k: make ath5k_modparam_no_hw_rfkill_switch real Danny Kukawka
@ 2012-01-30 22:00 ` Danny Kukawka
2012-01-30 23:13 ` Danny Kukawka
2012-01-30 22:00 ` [PATCH 13/16] riva/fbdev: fix several -Wuninitialized Danny Kukawka
` (4 subsequent siblings)
14 siblings, 1 reply; 33+ messages in thread
From: Danny Kukawka @ 2012-01-30 22:00 UTC (permalink / raw)
To: linux-usb
Cc: Greg Kroah-Hartman, Alan Cox, Johan Hovold, Jir i Slaby,
linux-kernel, linuxusb
Fix debug variable from module parameter to be really bool to
fix 'warning: return from incompatible pointer type'.
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
---
drivers/usb/serial/kobil_sct.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c
index 5d3beee..a92a3ef 100644
--- a/drivers/usb/serial/kobil_sct.c
+++ b/drivers/usb/serial/kobil_sct.c
@@ -38,7 +38,7 @@
#include <linux/ioctl.h>
#include "kobil_sct.h"
-static int debug;
+static bool debug;
/* Version Information */
#define DRIVER_VERSION "21/05/2004"
--
1.7.7.3
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH 13/16] riva/fbdev: fix several -Wuninitialized
2012-01-30 22:00 [PATCH RESEND 00/16] some compiler warning fixes Danny Kukawka
` (9 preceding siblings ...)
2012-01-30 22:00 ` [PATCH 12/16] kobil_sct: fix debug module parameter to be bool Danny Kukawka
@ 2012-01-30 22:00 ` Danny Kukawka
2012-02-13 21:26 ` Florian Tobias Schandinat
2012-01-30 22:00 ` [PATCH 14/16] hamradio: fix incompatible pointer in module parameter Danny Kukawka
` (3 subsequent siblings)
14 siblings, 1 reply; 33+ messages in thread
From: Danny Kukawka @ 2012-01-30 22:00 UTC (permalink / raw)
To: Antonino Daplas; +Cc: Florian Tobias Schandinat, linux-fbdev, linux-kernel
Fix several -Wuninitialized compiler warnings by changing the
order of getting modedb in riva_update_default_var() to set
first the fallback and then the prefered timing.
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
---
drivers/video/riva/fbdev.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c
index 2f58cf9..90df1a6 100644
--- a/drivers/video/riva/fbdev.c
+++ b/drivers/video/riva/fbdev.c
@@ -1816,6 +1816,8 @@ static void __devinit riva_update_default_var(struct fb_var_screeninfo *var,
specs->modedb, specs->modedb_len,
NULL, 8);
} else if (specs->modedb != NULL) {
+ /* get first mode in database as fallback */
+ modedb = specs->modedb[0];
/* get preferred timing */
if (info->monspecs.misc & FB_MISC_1ST_DETAIL) {
int i;
@@ -1826,9 +1828,6 @@ static void __devinit riva_update_default_var(struct fb_var_screeninfo *var,
break;
}
}
- } else {
- /* otherwise, get first mode in database */
- modedb = specs->modedb[0];
}
var->bits_per_pixel = 8;
riva_update_var(var, &modedb);
--
1.7.7.3
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH 14/16] hamradio: fix incompatible pointer in module parameter
2012-01-30 22:00 [PATCH RESEND 00/16] some compiler warning fixes Danny Kukawka
` (10 preceding siblings ...)
2012-01-30 22:00 ` [PATCH 13/16] riva/fbdev: fix several -Wuninitialized Danny Kukawka
@ 2012-01-30 22:00 ` Danny Kukawka
2012-02-01 19:40 ` David Miller
2012-01-30 22:00 ` [PATCH v2 15/16] leds-lp5521: fix compiler warning Danny Kukawka
` (2 subsequent siblings)
14 siblings, 1 reply; 33+ messages in thread
From: Danny Kukawka @ 2012-01-30 22:00 UTC (permalink / raw)
To: Thomas Sailer; +Cc: linux-hams, netdev, linux-kernel
Fixed 'warning: return from incompatible pointer type' related
to module parameters.
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
---
drivers/net/hamradio/baycom_epp.c | 2 +-
drivers/net/hamradio/baycom_par.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/hamradio/baycom_epp.c b/drivers/net/hamradio/baycom_epp.c
index 9537aaa..49b8b58 100644
--- a/drivers/net/hamradio/baycom_epp.c
+++ b/drivers/net/hamradio/baycom_epp.c
@@ -1162,7 +1162,7 @@ static void baycom_probe(struct net_device *dev)
/*
* command line settable parameters
*/
-static const char *mode[NR_PORTS] = { "", };
+static char *mode[NR_PORTS] = { "", };
static int iobase[NR_PORTS] = { 0x378, };
module_param_array(mode, charp, NULL, 0);
diff --git a/drivers/net/hamradio/baycom_par.c b/drivers/net/hamradio/baycom_par.c
index 279d229..f1aea0c 100644
--- a/drivers/net/hamradio/baycom_par.c
+++ b/drivers/net/hamradio/baycom_par.c
@@ -477,7 +477,7 @@ static int baycom_ioctl(struct net_device *dev, struct ifreq *ifr,
/*
* command line settable parameters
*/
-static const char *mode[NR_PORTS] = { "picpar", };
+static char *mode[NR_PORTS] = { "picpar", };
static int iobase[NR_PORTS] = { 0x378, };
module_param_array(mode, charp, NULL, 0);
--
1.7.7.3
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH v2 15/16] leds-lp5521: fix compiler warning
2012-01-30 22:00 [PATCH RESEND 00/16] some compiler warning fixes Danny Kukawka
` (11 preceding siblings ...)
2012-01-30 22:00 ` [PATCH 14/16] hamradio: fix incompatible pointer in module parameter Danny Kukawka
@ 2012-01-30 22:00 ` Danny Kukawka
2012-01-30 22:00 ` [PATCH v2 16/16] leds-lp5523: " Danny Kukawka
[not found] ` <1327960820-11867-9-git-send-email-danny.kukawka@bisect.de>
14 siblings, 0 replies; 33+ messages in thread
From: Danny Kukawka @ 2012-01-30 22:00 UTC (permalink / raw)
To: Richard Purdie; +Cc: linux-kernel
Fix for some -Wuninitialized compiler warnings.
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
---
drivers/leds/leds-lp5521.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c
index d62a798..8ce4525 100644
--- a/drivers/leds/leds-lp5521.c
+++ b/drivers/leds/leds-lp5521.c
@@ -193,6 +193,7 @@ static int lp5521_load_program(struct lp5521_engine *eng, const u8 *pattern)
struct lp5521_chip *chip = engine_to_lp5521(eng);
struct i2c_client *client = chip->client;
int ret;
+ int ret2;
int addr;
u8 mode;
@@ -200,7 +201,11 @@ static int lp5521_load_program(struct lp5521_engine *eng, const u8 *pattern)
ret = lp5521_set_engine_mode(eng, LP5521_CMD_DIRECT);
/* Mode change requires min 500 us delay. 1 - 2 ms with margin */
usleep_range(1000, 2000);
- ret |= lp5521_read(client, LP5521_REG_OP_MODE, &mode);
+ ret2 = lp5521_read(client, LP5521_REG_OP_MODE, &mode);
+ if (ret2 < 0)
+ return ret2;
+
+ ret |= ret2;
/* For loading, all the engines to load mode */
lp5521_write(client, LP5521_REG_OP_MODE, LP5521_CMD_DIRECT);
@@ -692,7 +697,12 @@ static int __devinit lp5521_probe(struct i2c_client *client,
* otherwise further access to the R G B channels in the
* LP5521_REG_ENABLE register will not have any effect - strange!
*/
- lp5521_read(client, LP5521_REG_R_CURRENT, &buf);
+ ret = lp5521_read(client, LP5521_REG_R_CURRENT, &buf);
+ if (ret) {
+ dev_err(&client->dev, "error in reading chip\n");
+ goto fail2;
+ }
+
if (buf != LP5521_REG_R_CURR_DEFAULT) {
dev_err(&client->dev, "error in reseting chip\n");
goto fail2;
--
1.7.7.3
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH v2 16/16] leds-lp5523: fix compiler warning
2012-01-30 22:00 [PATCH RESEND 00/16] some compiler warning fixes Danny Kukawka
` (12 preceding siblings ...)
2012-01-30 22:00 ` [PATCH v2 15/16] leds-lp5521: fix compiler warning Danny Kukawka
@ 2012-01-30 22:00 ` Danny Kukawka
[not found] ` <1327960820-11867-9-git-send-email-danny.kukawka@bisect.de>
14 siblings, 0 replies; 33+ messages in thread
From: Danny Kukawka @ 2012-01-30 22:00 UTC (permalink / raw)
To: Richard Purdie; +Cc: linux-kernel
Fix for some -Wuninitialized compiler warnings.
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
---
drivers/leds/leds-lp5523.c | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/leds/leds-lp5523.c b/drivers/leds/leds-lp5523.c
index 73e791a..c11fce0 100644
--- a/drivers/leds/leds-lp5523.c
+++ b/drivers/leds/leds-lp5523.c
@@ -192,7 +192,7 @@ static int lp5523_detect(struct i2c_client *client)
static int lp5523_configure(struct i2c_client *client)
{
struct lp5523_chip *chip = i2c_get_clientdata(client);
- int ret = 0;
+ int ret = 0, ret2 = 0;
u8 status;
/* one pattern per engine setting led mux start and stop addresses */
@@ -243,7 +243,10 @@ static int lp5523_configure(struct i2c_client *client)
/* Let the programs run for couple of ms and check the engine status */
usleep_range(3000, 6000);
- lp5523_read(client, LP5523_REG_STATUS, &status);
+ ret2 = lp5523_read(client, LP5523_REG_STATUS, &status);
+ if (ret2)
+ return -1;
+
status &= LP5523_ENG_STATUS_MASK;
if (status == LP5523_ENG_STATUS_MASK) {
@@ -461,7 +464,10 @@ static ssize_t lp5523_selftest(struct device *dev,
if (!(status & LP5523_LEDTEST_DONE))
usleep_range(3000, 6000); /* Was not ready. Wait little bit */
- ret |= lp5523_read(chip->client, LP5523_REG_LED_TEST_ADC, &vdd);
+ ret = lp5523_read(chip->client, LP5523_REG_LED_TEST_ADC, &vdd);
+ if (ret)
+ goto fail;
+
vdd--; /* There may be some fluctuation in measurement */
for (i = 0; i < LP5523_LEDS; i++) {
@@ -485,7 +491,9 @@ static ssize_t lp5523_selftest(struct device *dev,
ret = lp5523_read(chip->client, LP5523_REG_STATUS, &status);
if (!(status & LP5523_LEDTEST_DONE))
usleep_range(3000, 6000);/* Was not ready. Wait. */
- ret |= lp5523_read(chip->client, LP5523_REG_LED_TEST_ADC, &adc);
+ ret = lp5523_read(chip->client, LP5523_REG_LED_TEST_ADC, &adc);
+ if (ret)
+ goto fail;
if (adc >= vdd || adc < LP5523_ADC_SHORTCIRC_LIM)
pos += sprintf(buf + pos, "LED %d FAIL\n", i);
--
1.7.7.3
^ permalink raw reply related [flat|nested] 33+ messages in thread
* Re: [PATCH 11/16] ath5k: make ath5k_modparam_no_hw_rfkill_switch real
2012-01-30 22:00 ` [PATCH 11/16] ath5k: make ath5k_modparam_no_hw_rfkill_switch real Danny Kukawka
@ 2012-01-30 22:11 ` Jiri Slaby
2012-01-30 23:09 ` Danny Kukawka
0 siblings, 1 reply; 33+ messages in thread
From: Jiri Slaby @ 2012-01-30 22:11 UTC (permalink / raw)
To: Danny Kukawka
Cc: ath5k-devel, Nick Kossifidis, Luis R. Rodriguez, Bob Copeland,
John W. Linville, linux-wireless, netdev, linux-kernel
On 01/30/2012 11:00 PM, Danny Kukawka wrote:
> Make ath5k_modparam_no_hw_rfkill_switch real bool to fix:
> 'warning: return from incompatible pointer type' compiler warning.
Hi, I'm afraid you are too late:
http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=commitdiff;h=11deb53328a06ad4edbf774f5c3b61c6dbb9104c
> Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
> ---
> drivers/net/wireless/ath/ath5k/base.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
> index d366dad..ad2f115 100644
> --- a/drivers/net/wireless/ath/ath5k/base.c
> +++ b/drivers/net/wireless/ath/ath5k/base.c
> @@ -80,7 +80,7 @@ static bool modparam_fastchanswitch;
> module_param_named(fastchanswitch, modparam_fastchanswitch, bool, S_IRUGO);
> MODULE_PARM_DESC(fastchanswitch, "Enable fast channel switching for AR2413/AR5413 radios.");
>
> -static int ath5k_modparam_no_hw_rfkill_switch;
> +static bool ath5k_modparam_no_hw_rfkill_switch;
> module_param_named(no_hw_rfkill_switch, ath5k_modparam_no_hw_rfkill_switch,
> bool, S_IRUGO);
> MODULE_PARM_DESC(no_hw_rfkill_switch, "Ignore the GPIO RFKill switch state");
thanks,
--
js
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 11/16] ath5k: make ath5k_modparam_no_hw_rfkill_switch real
2012-01-30 22:11 ` Jiri Slaby
@ 2012-01-30 23:09 ` Danny Kukawka
0 siblings, 0 replies; 33+ messages in thread
From: Danny Kukawka @ 2012-01-30 23:09 UTC (permalink / raw)
To: Jiri Slaby
Cc: ath5k-devel, Nick Kossifidis, Luis R. Rodriguez, Bob Copeland,
John W. Linville, linux-wireless, netdev, linux-kernel
On Montag, 30. Januar 2012, Jiri Slaby wrote:
> On 01/30/2012 11:00 PM, Danny Kukawka wrote:
> > Make ath5k_modparam_no_hw_rfkill_switch real bool to fix:
> > 'warning: return from incompatible pointer type' compiler warning.
>
> Hi, I'm afraid you are too late:
> http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=commitdiff;
>h=11deb53328a06ad4edbf774f5c3b61c6dbb9104c
Hi,
no problem. I didn't check against linux-next.
Danny
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 01/16] eicon: fix -Warray-bounds warning
2012-01-30 22:00 ` [PATCH 01/16] eicon: fix -Warray-bounds warning Danny Kukawka
@ 2012-01-30 23:09 ` Ben Hutchings
2012-01-31 15:25 ` Karsten Keil
0 siblings, 1 reply; 33+ messages in thread
From: Ben Hutchings @ 2012-01-30 23:09 UTC (permalink / raw)
To: Danny Kukawka; +Cc: Armin Schindler, linux-kernel, netdev, Karsten Keil
On Mon, 2012-01-30 at 23:00 +0100, Danny Kukawka wrote:
> Fix for a -Warray-bounds warning. mixer_notify_update() tries to
> write to ((CAPI_MSG *) msg)->info.facility_req.structs[3] while
> structs is defined as byte structs[1], define structs[1] as
> structs[4].
I suspect that all the 'byte structs[1];' fields defined in that header
are actually variable-length arrays. In that case, there may be no
reasonable bound you can specify.
Ben.
> Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
> ---
> drivers/isdn/hardware/eicon/capi20.h | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/isdn/hardware/eicon/capi20.h b/drivers/isdn/hardware/eicon/capi20.h
> index 7ebcccd..f9170ad 100644
> --- a/drivers/isdn/hardware/eicon/capi20.h
> +++ b/drivers/isdn/hardware/eicon/capi20.h
> @@ -226,7 +226,7 @@ typedef struct {
> /* FACILITY-REQUEST */
> typedef struct {
> word Selector;
> - byte structs[1]; /* Facility parameters */
> + byte structs[4]; /* Facility parameters */
> } _FAC_REQP;
> /* FACILITY-CONFIRM STRUCT FOR SUPPLEMENT. SERVICES */
> typedef struct {
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 12/16] kobil_sct: fix debug module parameter to be bool
2012-01-30 22:00 ` [PATCH 12/16] kobil_sct: fix debug module parameter to be bool Danny Kukawka
@ 2012-01-30 23:13 ` Danny Kukawka
0 siblings, 0 replies; 33+ messages in thread
From: Danny Kukawka @ 2012-01-30 23:13 UTC (permalink / raw)
To: linux-usb
Cc: Greg Kroah-Hartman, Alan Cox, Johan Hovold, Jir i Slaby,
linux-kernel, linuxusb
On Montag, 30. Januar 2012, Danny Kukawka wrote:
> Fix debug variable from module parameter to be really bool to
> fix 'warning: return from incompatible pointer type'.
>
> Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
> ---
> drivers/usb/serial/kobil_sct.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/usb/serial/kobil_sct.c
> b/drivers/usb/serial/kobil_sct.c index 5d3beee..a92a3ef 100644
> --- a/drivers/usb/serial/kobil_sct.c
> +++ b/drivers/usb/serial/kobil_sct.c
> @@ -38,7 +38,7 @@
> #include <linux/ioctl.h>
> #include "kobil_sct.h"
>
> -static int debug;
> +static bool debug;
>
> /* Version Information */
> #define DRIVER_VERSION "21/05/2004"
Forget this one, it's already in linux-next:
http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=commitdiff;h=3297f86a3d4158e052538c7b9a3dea9c855a1b42;hp=2492c6e6454ff3edb11e273b071a6ea80a199c71
Danny
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 05/16] cx18: fix handling of 'radio' module parameter
2012-01-30 22:00 ` [PATCH 05/16] cx18: fix handling of 'radio' module parameter Danny Kukawka
@ 2012-01-31 13:45 ` Danny Kukawka
2012-01-31 14:59 ` Andy Walls
2012-02-01 2:29 ` Rusty Russell
0 siblings, 2 replies; 33+ messages in thread
From: Danny Kukawka @ 2012-01-31 13:45 UTC (permalink / raw)
To: Andy Walls
Cc: Mauro Carvalho Chehab, ivtv-devel, linux-media, linux-kernel,
Rusty Russell, mchehab
On Dienstag, 31. Januar 2012, Andy Walls wrote:
> On Tue, 2012-01-31 at 05:01 -0500, Andy Walls wrote:
> > On Mon, 2012-01-30 at 20:40 +0100, Danny Kukawka wrote:
> > > Fixed handling of 'radio' module parameter from module_param_array
> > > to module_param_named to fix these compiler warnings in cx18-driver.c:
> >
> > NACK.
> >
> > "radio" is an array of tristate values (-1, 0, 1) per installed card:
> >
> > static int radio[CX18_MAX_CARDS] = { -1, -1,
> >
> > and must remain an array or you will break the driver.
> >
> > Calling "radio_c" a module parameter named "radio" is wrong.
> >
> > The correct fix is to reverse Rusty Russel's patch to the driver in
> > commit 90ab5ee94171b3e28de6bb42ee30b527014e0be7
> > to change the "bool" back to an "int" as it should be in
>
> ^^^^
> Sorry, a typo here. Disregard the word "back".
Overseen this. But wouldn't be the correct fix in this case to:
a) reverse the part of 90ab5ee94171b3e28de6bb42ee30b527014e0be7 to:
get:
static unsigned radio_c = 1;
b) change the following line:
module_param_array(radio, bool, &radio_c, 0644);
to:
module_param_array(radio, int, &radio_c, 0644);
Without b) you would get a warning from the compiler again.
Danny
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH v2 08/16] ivtv-driver: fix handling of 'radio' module parameter
[not found] ` <1327960820-11867-9-git-send-email-danny.kukawka@bisect.de>
@ 2012-01-31 13:45 ` Danny Kukawka
2012-01-31 15:00 ` Andy Walls
0 siblings, 1 reply; 33+ messages in thread
From: Danny Kukawka @ 2012-01-31 13:45 UTC (permalink / raw)
To: Andy Walls
Cc: ivtv-devel, linux-media, linux-kernel, mchehab, Rusty Russell,
Mauro Carvalho Chehab
On Dienstag, 31. Januar 2012, Andy Walls wrote:
> On Mon, 2012-01-30 at 20:40 +0100, Danny Kukawka wrote:
> > Fixed handling of 'radio' module parameter from module_param_array
> > to module_param_named to fix these compiler warnings in ivtv-driver.c:
> >
> > In function ‘__check_radio’:
> > 113:1: warning: return from incompatible pointer type [enabled by
> > default] At top level:
> > 113:1: warning: initialization from incompatible pointer type [enabled by
> > default] 113:1: warning: (near initialization for
> > ‘__param_arr_radio.num’) [enabled by default]
> >
> > Set initial state of radio_c to true instead of 1.
>
> NACK.
>
> "radio" is an array of tristate values (-1, 0, 1) per installed card:
>
> static int radio[IVTV_MAX_CARDS] = { -1, -1,
>
> and must remain an array or you will break the driver.
>
> Calling "radio_c" a module parameter named "radio" is wrong.
>
> The correct fix is to reverse Rusty Russel's patch to the driver in
> commit 90ab5ee94171b3e28de6bb42ee30b527014e0be7
> to change the "bool" to an "int" as it should be in
> "module_param_array(radio, ...)"
Overseen this. But wouldn't be the correct fix in this case to:
a) reverse the part of 90ab5ee94171b3e28de6bb42ee30b527014e0be7 to get:
static unsigned int radio_c = 1;
b) change the following line:
module_param_array(radio, bool, &radio_c, 0644);
to:
module_param_array(radio, int, &radio_c, 0644);
Without b) you would get a warning from the compiler again.
Danny
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 05/16] cx18: fix handling of 'radio' module parameter
2012-01-31 13:45 ` Danny Kukawka
@ 2012-01-31 14:59 ` Andy Walls
2012-02-01 2:29 ` Rusty Russell
1 sibling, 0 replies; 33+ messages in thread
From: Andy Walls @ 2012-01-31 14:59 UTC (permalink / raw)
To: Danny Kukawka
Cc: Mauro Carvalho Chehab, ivtv-devel, linux-media, linux-kernel,
Rusty Russell, mchehab
Danny Kukawka <danny.kukawka@bisect.de> wrote:
>On Dienstag, 31. Januar 2012, Andy Walls wrote:
>> On Tue, 2012-01-31 at 05:01 -0500, Andy Walls wrote:
>> > On Mon, 2012-01-30 at 20:40 +0100, Danny Kukawka wrote:
>> > > Fixed handling of 'radio' module parameter from
>module_param_array
>> > > to module_param_named to fix these compiler warnings in
>cx18-driver.c:
>> >
>> > NACK.
>> >
>> > "radio" is an array of tristate values (-1, 0, 1) per installed
>card:
>> >
>> > static int radio[CX18_MAX_CARDS] = { -1, -1,
>> >
>> > and must remain an array or you will break the driver.
>> >
>> > Calling "radio_c" a module parameter named "radio" is wrong.
>> >
>> > The correct fix is to reverse Rusty Russel's patch to the driver in
>> > commit 90ab5ee94171b3e28de6bb42ee30b527014e0be7
>> > to change the "bool" back to an "int" as it should be in
>>
>> ^^^^
>> Sorry, a typo here. Disregard the word "back".
>
>Overseen this. But wouldn't be the correct fix in this case to:
>a) reverse the part of 90ab5ee94171b3e28de6bb42ee30b527014e0be7 to:
> get:
> static unsigned radio_c = 1;
>
>b) change the following line:
> module_param_array(radio, bool, &radio_c, 0644);
> to:
> module_param_array(radio, int, &radio_c, 0644);
>
>Without b) you would get a warning from the compiler again.
>
>Danny
Yes, both need to happen.
I mentioned b) at the end of my original email.
Regards,
Andy
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH v2 08/16] ivtv-driver: fix handling of 'radio' module parameter
2012-01-31 13:45 ` [PATCH v2 08/16] ivtv-driver: fix handling of 'radio' module parameter Danny Kukawka
@ 2012-01-31 15:00 ` Andy Walls
0 siblings, 0 replies; 33+ messages in thread
From: Andy Walls @ 2012-01-31 15:00 UTC (permalink / raw)
To: Danny Kukawka
Cc: ivtv-devel, linux-media, linux-kernel, mchehab, Rusty Russell,
Mauro Carvalho Chehab
Danny Kukawka <danny.kukawka@bisect.de> wrote:
>On Dienstag, 31. Januar 2012, Andy Walls wrote:
>> On Mon, 2012-01-30 at 20:40 +0100, Danny Kukawka wrote:
>> > Fixed handling of 'radio' module parameter from module_param_array
>> > to module_param_named to fix these compiler warnings in
>ivtv-driver.c:
>> >
>> > In function ‘__check_radio’:
>> > 113:1: warning: return from incompatible pointer type [enabled by
>> > default] At top level:
>> > 113:1: warning: initialization from incompatible pointer type
>[enabled by
>> > default] 113:1: warning: (near initialization for
>> > ‘__param_arr_radio.num’) [enabled by default]
>> >
>> > Set initial state of radio_c to true instead of 1.
>>
>> NACK.
>>
>> "radio" is an array of tristate values (-1, 0, 1) per installed card:
>>
>> static int radio[IVTV_MAX_CARDS] = { -1, -1,
>>
>> and must remain an array or you will break the driver.
>>
>> Calling "radio_c" a module parameter named "radio" is wrong.
>>
>> The correct fix is to reverse Rusty Russel's patch to the driver in
>> commit 90ab5ee94171b3e28de6bb42ee30b527014e0be7
>> to change the "bool" to an "int" as it should be in
>> "module_param_array(radio, ...)"
>
>Overseen this. But wouldn't be the correct fix in this case to:
>a) reverse the part of 90ab5ee94171b3e28de6bb42ee30b527014e0be7 to get:
> static unsigned int radio_c = 1;
>
>b) change the following line:
> module_param_array(radio, bool, &radio_c, 0644);
> to:
> module_param_array(radio, int, &radio_c, 0644);
>
>Without b) you would get a warning from the compiler again.
>
>Danny
Yes both need to happen.
I mentioned b) in my original email.
Regards,
Andy
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 01/16] eicon: fix -Warray-bounds warning
2012-01-30 23:09 ` Ben Hutchings
@ 2012-01-31 15:25 ` Karsten Keil
2012-01-31 17:04 ` Danny Kukawka
0 siblings, 1 reply; 33+ messages in thread
From: Karsten Keil @ 2012-01-31 15:25 UTC (permalink / raw)
To: Ben Hutchings
Cc: Danny Kukawka, Armin Schindler, linux-kernel, netdev, Karsten Keil
On Mon, Jan 30, 2012 at 11:09:32PM +0000, Ben Hutchings wrote:
> On Mon, 2012-01-30 at 23:00 +0100, Danny Kukawka wrote:
> > Fix for a -Warray-bounds warning. mixer_notify_update() tries to
> > write to ((CAPI_MSG *) msg)->info.facility_req.structs[3] while
> > structs is defined as byte structs[1], define structs[1] as
> > structs[4].
>
> I suspect that all the 'byte structs[1];' fields defined in that header
> are actually variable-length arrays. In that case, there may be no
> reasonable bound you can specify.
Yes, exactely, the structs is a ASN1 coded message so it can have any len.
Karsten
>
> Ben.
>
> > Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
> > ---
> > drivers/isdn/hardware/eicon/capi20.h | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/isdn/hardware/eicon/capi20.h b/drivers/isdn/hardware/eicon/capi20.h
> > index 7ebcccd..f9170ad 100644
> > --- a/drivers/isdn/hardware/eicon/capi20.h
> > +++ b/drivers/isdn/hardware/eicon/capi20.h
> > @@ -226,7 +226,7 @@ typedef struct {
> > /* FACILITY-REQUEST */
> > typedef struct {
> > word Selector;
> > - byte structs[1]; /* Facility parameters */
> > + byte structs[4]; /* Facility parameters */
> > } _FAC_REQP;
> > /* FACILITY-CONFIRM STRUCT FOR SUPPLEMENT. SERVICES */
> > typedef struct {
>
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 01/16] eicon: fix -Warray-bounds warning
2012-01-31 15:25 ` Karsten Keil
@ 2012-01-31 17:04 ` Danny Kukawka
2012-02-01 9:04 ` David Laight
0 siblings, 1 reply; 33+ messages in thread
From: Danny Kukawka @ 2012-01-31 17:04 UTC (permalink / raw)
To: Karsten Keil
Cc: Ben Hutchings, Armin Schindler, linux-kernel, netdev, Karsten Keil
On Dienstag, 31. Januar 2012, Karsten Keil wrote:
> On Mon, Jan 30, 2012 at 11:09:32PM +0000, Ben Hutchings wrote:
> > On Mon, 2012-01-30 at 23:00 +0100, Danny Kukawka wrote:
> > > Fix for a -Warray-bounds warning. mixer_notify_update() tries to
> > > write to ((CAPI_MSG *) msg)->info.facility_req.structs[3] while
> > > structs is defined as byte structs[1], define structs[1] as
> > > structs[4].
> >
> > I suspect that all the 'byte structs[1];' fields defined in that header
> > are actually variable-length arrays. In that case, there may be no
> > reasonable bound you can specify.
>
> Yes, exactely, the structs is a ASN1 coded message so it can have any len.
So, how can we get rid of the compiler warning then?
Danny
> Karsten
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 05/16] cx18: fix handling of 'radio' module parameter
2012-01-31 13:45 ` Danny Kukawka
2012-01-31 14:59 ` Andy Walls
@ 2012-02-01 2:29 ` Rusty Russell
1 sibling, 0 replies; 33+ messages in thread
From: Rusty Russell @ 2012-02-01 2:29 UTC (permalink / raw)
To: Danny Kukawka, Andy Walls
Cc: Mauro Carvalho Chehab, ivtv-devel, linux-media, linux-kernel, mchehab
On Tue, 31 Jan 2012 14:45:18 +0100, Danny Kukawka <danny.kukawka@bisect.de> wrote:
> On Dienstag, 31. Januar 2012, Andy Walls wrote:
> Overseen this. But wouldn't be the correct fix in this case to:
> a) reverse the part of 90ab5ee94171b3e28de6bb42ee30b527014e0be7 to:
> get:
> static unsigned radio_c = 1;
>
> b) change the following line:
> module_param_array(radio, bool, &radio_c, 0644);
> to:
> module_param_array(radio, int, &radio_c, 0644);
Yes, sorry, my patch was complete crap here :(
If you want people to set it only to 1 or 0, you probably want "bint".
Thanks,
Rusty.
^ permalink raw reply [flat|nested] 33+ messages in thread
* RE: [PATCH 01/16] eicon: fix -Warray-bounds warning
2012-01-31 17:04 ` Danny Kukawka
@ 2012-02-01 9:04 ` David Laight
2012-02-01 12:52 ` Danny Kukawka
0 siblings, 1 reply; 33+ messages in thread
From: David Laight @ 2012-02-01 9:04 UTC (permalink / raw)
To: Danny Kukawka, Karsten Keil
Cc: Ben Hutchings, Armin Schindler, linux-kernel, netdev, Karsten Keil
> -----Original Message-----
> From: netdev-owner@vger.kernel.org
> [mailto:netdev-owner@vger.kernel.org] On Behalf Of Danny Kukawka
> Sent: 31 January 2012 17:04
> To: Karsten Keil
> Cc: Ben Hutchings; Armin Schindler;
> linux-kernel@vger.kernel.org; netdev@vger.kernel.org; Karsten Keil
> Subject: Re: [PATCH 01/16] eicon: fix -Warray-bounds warning
>
> On Dienstag, 31. Januar 2012, Karsten Keil wrote:
> > On Mon, Jan 30, 2012 at 11:09:32PM +0000, Ben Hutchings wrote:
> > > On Mon, 2012-01-30 at 23:00 +0100, Danny Kukawka wrote:
> > > > Fix for a -Warray-bounds warning. mixer_notify_update() tries to
> > > > write to ((CAPI_MSG *) msg)->info.facility_req.structs[3] while
> > > > structs is defined as byte structs[1], define structs[1] as
> > > > structs[4].
> > >
> > > I suspect that all the 'byte structs[1];' fields defined
> in that header
> > > are actually variable-length arrays. In that case, there
> may be no
> > > reasonable bound you can specify.
> >
> > Yes, exactely, the structs is a ASN1 coded message so it
> can have any len.
>
> So, how can we get rid of the compiler warning then?
Try defining it as a 'variable sized array' - byte structs[0].
David
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 01/16] eicon: fix -Warray-bounds warning
2012-02-01 9:04 ` David Laight
@ 2012-02-01 12:52 ` Danny Kukawka
2012-02-02 18:25 ` Karsten Keil
0 siblings, 1 reply; 33+ messages in thread
From: Danny Kukawka @ 2012-02-01 12:52 UTC (permalink / raw)
To: David Laight
Cc: Karsten Keil, Ben Hutchings, Armin Schindler, linux-kernel,
netdev, Karsten Keil
On Mittwoch, 1. Februar 2012, David Laight wrote:
> > -----Original Message-----
> > From: netdev-owner@vger.kernel.org
> > [mailto:netdev-owner@vger.kernel.org] On Behalf Of Danny Kukawka
> > Sent: 31 January 2012 17:04
> > To: Karsten Keil
> > Cc: Ben Hutchings; Armin Schindler;
> > linux-kernel@vger.kernel.org; netdev@vger.kernel.org; Karsten Keil
> > Subject: Re: [PATCH 01/16] eicon: fix -Warray-bounds warning
> >
> > On Dienstag, 31. Januar 2012, Karsten Keil wrote:
> > > On Mon, Jan 30, 2012 at 11:09:32PM +0000, Ben Hutchings wrote:
> > > > On Mon, 2012-01-30 at 23:00 +0100, Danny Kukawka wrote:
> > > > > Fix for a -Warray-bounds warning. mixer_notify_update() tries to
> > > > > write to ((CAPI_MSG *) msg)->info.facility_req.structs[3] while
> > > > > structs is defined as byte structs[1], define structs[1] as
> > > > > structs[4].
> > > >
> > > > I suspect that all the 'byte structs[1];' fields defined
> >
> > in that header
> >
> > > > are actually variable-length arrays. In that case, there
> >
> > may be no
> >
> > > > reasonable bound you can specify.
> > >
> > > Yes, exactely, the structs is a ASN1 coded message so it
> >
> > can have any len.
> >
> > So, how can we get rid of the compiler warning then?
>
> Try defining it as a 'variable sized array' - byte structs[0].
Okay, that works. I'll send an updated patch.
Thanks
Danny
> David
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 14/16] hamradio: fix incompatible pointer in module parameter
2012-01-30 22:00 ` [PATCH 14/16] hamradio: fix incompatible pointer in module parameter Danny Kukawka
@ 2012-02-01 19:40 ` David Miller
0 siblings, 0 replies; 33+ messages in thread
From: David Miller @ 2012-02-01 19:40 UTC (permalink / raw)
To: danny.kukawka; +Cc: t.sailer, linux-hams, netdev, linux-kernel
From: Danny Kukawka <danny.kukawka@bisect.de>
Date: Mon, 30 Jan 2012 23:00:18 +0100
> Fixed 'warning: return from incompatible pointer type' related
> to module parameters.
>
> Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Applied, thanks.
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 01/16] eicon: fix -Warray-bounds warning
2012-02-01 12:52 ` Danny Kukawka
@ 2012-02-02 18:25 ` Karsten Keil
0 siblings, 0 replies; 33+ messages in thread
From: Karsten Keil @ 2012-02-02 18:25 UTC (permalink / raw)
To: Danny Kukawka
Cc: David Laight, Karsten Keil, Ben Hutchings, Armin Schindler,
linux-kernel, netdev, Karsten Keil
On Wed, Feb 01, 2012 at 01:52:18PM +0100, Danny Kukawka wrote:
> On Mittwoch, 1. Februar 2012, David Laight wrote:
> > > -----Original Message-----
> > > From: netdev-owner@vger.kernel.org
> > > [mailto:netdev-owner@vger.kernel.org] On Behalf Of Danny Kukawka
> > > Sent: 31 January 2012 17:04
> > > To: Karsten Keil
> > > Cc: Ben Hutchings; Armin Schindler;
> > > linux-kernel@vger.kernel.org; netdev@vger.kernel.org; Karsten Keil
> > > Subject: Re: [PATCH 01/16] eicon: fix -Warray-bounds warning
> > >
> > > On Dienstag, 31. Januar 2012, Karsten Keil wrote:
> > > > On Mon, Jan 30, 2012 at 11:09:32PM +0000, Ben Hutchings wrote:
> > > > > On Mon, 2012-01-30 at 23:00 +0100, Danny Kukawka wrote:
> > > > > > Fix for a -Warray-bounds warning. mixer_notify_update() tries to
> > > > > > write to ((CAPI_MSG *) msg)->info.facility_req.structs[3] while
> > > > > > structs is defined as byte structs[1], define structs[1] as
> > > > > > structs[4].
> > > > >
> > > > > I suspect that all the 'byte structs[1];' fields defined
> > >
> > > in that header
> > >
> > > > > are actually variable-length arrays. In that case, there
> > >
> > > may be no
> > >
> > > > > reasonable bound you can specify.
> > > >
> > > > Yes, exactely, the structs is a ASN1 coded message so it
> > >
> > > can have any len.
> > >
> > > So, how can we get rid of the compiler warning then?
> >
> > Try defining it as a 'variable sized array' - byte structs[0].
>
> Okay, that works. I'll send an updated patch.
>
Nice, I did not know this way.
Karsten
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 06/16] cpcihp: fix debug module parameter to be bool
2012-01-30 22:00 ` [PATCH 06/16] cpcihp: fix debug module parameter to be bool Danny Kukawka
@ 2012-02-03 0:06 ` Scott Murray
2012-02-10 19:40 ` Jesse Barnes
1 sibling, 0 replies; 33+ messages in thread
From: Scott Murray @ 2012-02-03 0:06 UTC (permalink / raw)
To: Danny Kukawka; +Cc: Jesse Barnes, linux-pci, linux-kernel
Sorry for the delay, this looks fine.
Acked-by: Scott Murray <scott@spiteful.org>
On Mon, Jan 30, 2012 at 5:00 PM, Danny Kukawka <danny.kukawka@bisect.de> wrote:
>
> Fix debug variable from module parameter to be really bool to
> fix 'warning: return from incompatible pointer type'.
>
> Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
> ---
> drivers/pci/hotplug/cpcihp_generic.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/pci/hotplug/cpcihp_generic.c b/drivers/pci/hotplug/cpcihp_generic.c
> index fb3f846..81af764 100644
> --- a/drivers/pci/hotplug/cpcihp_generic.c
> +++ b/drivers/pci/hotplug/cpcihp_generic.c
> @@ -62,7 +62,7 @@
> #define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME , ## arg)
>
> /* local variables */
> -static int debug;
> +static bool debug;
> static char *bridge;
> static u8 bridge_busnr;
> static u8 bridge_slot;
> --
> 1.7.7.3
>
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 06/16] cpcihp: fix debug module parameter to be bool
2012-01-30 22:00 ` [PATCH 06/16] cpcihp: fix debug module parameter to be bool Danny Kukawka
2012-02-03 0:06 ` Scott Murray
@ 2012-02-10 19:40 ` Jesse Barnes
1 sibling, 0 replies; 33+ messages in thread
From: Jesse Barnes @ 2012-02-10 19:40 UTC (permalink / raw)
To: Danny Kukawka; +Cc: Scott Murray, linux-pci, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 967 bytes --]
On Mon, 30 Jan 2012 23:00:10 +0100
Danny Kukawka <danny.kukawka@bisect.de> wrote:
> Fix debug variable from module parameter to be really bool to
> fix 'warning: return from incompatible pointer type'.
>
> Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
> ---
> drivers/pci/hotplug/cpcihp_generic.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/pci/hotplug/cpcihp_generic.c b/drivers/pci/hotplug/cpcihp_generic.c
> index fb3f846..81af764 100644
> --- a/drivers/pci/hotplug/cpcihp_generic.c
> +++ b/drivers/pci/hotplug/cpcihp_generic.c
> @@ -62,7 +62,7 @@
> #define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME , ## arg)
>
> /* local variables */
> -static int debug;
> +static bool debug;
> static char *bridge;
> static u8 bridge_busnr;
> static u8 bridge_slot;
Applied to my -next branch, thanks.
--
Jesse Barnes, Intel Open Source Technology Center
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 13/16] riva/fbdev: fix several -Wuninitialized
2012-01-30 22:00 ` [PATCH 13/16] riva/fbdev: fix several -Wuninitialized Danny Kukawka
@ 2012-02-13 21:26 ` Florian Tobias Schandinat
0 siblings, 0 replies; 33+ messages in thread
From: Florian Tobias Schandinat @ 2012-02-13 21:26 UTC (permalink / raw)
To: Danny Kukawka; +Cc: Antonino Daplas, linux-fbdev, linux-kernel
On 01/30/2012 10:00 PM, Danny Kukawka wrote:
> Fix several -Wuninitialized compiler warnings by changing the
> order of getting modedb in riva_update_default_var() to set
> first the fallback and then the prefered timing.
>
> Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Applied.
Thanks,
Florian Tobias Schandinat
> ---
> drivers/video/riva/fbdev.c | 5 ++---
> 1 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c
> index 2f58cf9..90df1a6 100644
> --- a/drivers/video/riva/fbdev.c
> +++ b/drivers/video/riva/fbdev.c
> @@ -1816,6 +1816,8 @@ static void __devinit riva_update_default_var(struct fb_var_screeninfo *var,
> specs->modedb, specs->modedb_len,
> NULL, 8);
> } else if (specs->modedb != NULL) {
> + /* get first mode in database as fallback */
> + modedb = specs->modedb[0];
> /* get preferred timing */
> if (info->monspecs.misc & FB_MISC_1ST_DETAIL) {
> int i;
> @@ -1826,9 +1828,6 @@ static void __devinit riva_update_default_var(struct fb_var_screeninfo *var,
> break;
> }
> }
> - } else {
> - /* otherwise, get first mode in database */
> - modedb = specs->modedb[0];
> }
> var->bits_per_pixel = 8;
> riva_update_var(var, &modedb);
^ permalink raw reply [flat|nested] 33+ messages in thread
end of thread, other threads:[~2012-02-13 21:26 UTC | newest]
Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-30 22:00 [PATCH RESEND 00/16] some compiler warning fixes Danny Kukawka
2012-01-30 22:00 ` [PATCH 01/16] eicon: fix -Warray-bounds warning Danny Kukawka
2012-01-30 23:09 ` Ben Hutchings
2012-01-31 15:25 ` Karsten Keil
2012-01-31 17:04 ` Danny Kukawka
2012-02-01 9:04 ` David Laight
2012-02-01 12:52 ` Danny Kukawka
2012-02-02 18:25 ` Karsten Keil
2012-01-30 22:00 ` [PATCH v2 02/16] max2165: trival fix for some -Wuninitialized warning Danny Kukawka
2012-01-30 22:00 ` [PATCH v2 03/16] mmc: " Danny Kukawka
2012-01-30 22:00 ` [PATCH 05/16] cx18: fix handling of 'radio' module parameter Danny Kukawka
2012-01-31 13:45 ` Danny Kukawka
2012-01-31 14:59 ` Andy Walls
2012-02-01 2:29 ` Rusty Russell
2012-01-30 22:00 ` [PATCH 06/16] cpcihp: fix debug module parameter to be bool Danny Kukawka
2012-02-03 0:06 ` Scott Murray
2012-02-10 19:40 ` Jesse Barnes
2012-01-30 22:00 ` [PATCH v2 07/16] hdaps: trivial fix for -Wuninitialized Danny Kukawka
2012-01-30 22:00 ` [PATCH 09/16] [RFC] aic94xx: " Danny Kukawka
2012-01-30 22:00 ` [PATCH 10/16] ixj: fix Wsequence-point compiler warnings Danny Kukawka
2012-01-30 22:00 ` [PATCH 11/16] ath5k: make ath5k_modparam_no_hw_rfkill_switch real Danny Kukawka
2012-01-30 22:11 ` Jiri Slaby
2012-01-30 23:09 ` Danny Kukawka
2012-01-30 22:00 ` [PATCH 12/16] kobil_sct: fix debug module parameter to be bool Danny Kukawka
2012-01-30 23:13 ` Danny Kukawka
2012-01-30 22:00 ` [PATCH 13/16] riva/fbdev: fix several -Wuninitialized Danny Kukawka
2012-02-13 21:26 ` Florian Tobias Schandinat
2012-01-30 22:00 ` [PATCH 14/16] hamradio: fix incompatible pointer in module parameter Danny Kukawka
2012-02-01 19:40 ` David Miller
2012-01-30 22:00 ` [PATCH v2 15/16] leds-lp5521: fix compiler warning Danny Kukawka
2012-01-30 22:00 ` [PATCH v2 16/16] leds-lp5523: " Danny Kukawka
[not found] ` <1327960820-11867-9-git-send-email-danny.kukawka@bisect.de>
2012-01-31 13:45 ` [PATCH v2 08/16] ivtv-driver: fix handling of 'radio' module parameter Danny Kukawka
2012-01-31 15:00 ` Andy Walls
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).