* [PATCH 01/16] eicon: fix -Warray-bounds warning [not found] <1327960820-11867-1-git-send-email-danny.kukawka@bisect.de> @ 2012-01-30 22:00 ` Danny Kukawka 2012-01-30 23:09 ` Ben Hutchings 2012-01-30 22:00 ` [PATCH 11/16] ath5k: make ath5k_modparam_no_hw_rfkill_switch real Danny Kukawka 2012-01-30 22:00 ` [PATCH 14/16] hamradio: fix incompatible pointer in module parameter Danny Kukawka 2 siblings, 1 reply; 12+ 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] 12+ 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; 12+ 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] 12+ 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; 12+ 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] 12+ 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; 12+ 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] 12+ 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; 12+ 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] 12+ 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; 12+ 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] 12+ 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; 12+ 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] 12+ messages in thread
* [PATCH 11/16] ath5k: make ath5k_modparam_no_hw_rfkill_switch real [not found] <1327960820-11867-1-git-send-email-danny.kukawka@bisect.de> 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:11 ` Jiri Slaby 2012-01-30 22:00 ` [PATCH 14/16] hamradio: fix incompatible pointer in module parameter Danny Kukawka 2 siblings, 1 reply; 12+ 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] 12+ 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 [not found] ` <4F2715A7.9030101-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 12+ 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] 12+ messages in thread
[parent not found: <4F2715A7.9030101-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH 11/16] ath5k: make ath5k_modparam_no_hw_rfkill_switch real [not found] ` <4F2715A7.9030101-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2012-01-30 23:09 ` Danny Kukawka 0 siblings, 0 replies; 12+ messages in thread From: Danny Kukawka @ 2012-01-30 23:09 UTC (permalink / raw) To: Jiri Slaby Cc: ath5k-devel-xDcbHBWguxEUs3QNXV6qNA, linux-wireless-u79uwXL29TY76Z2rM5mHXA, John W. Linville, linux-kernel-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA 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] 12+ messages in thread
* [PATCH 14/16] hamradio: fix incompatible pointer in module parameter [not found] <1327960820-11867-1-git-send-email-danny.kukawka@bisect.de> 2012-01-30 22:00 ` [PATCH 01/16] eicon: fix -Warray-bounds warning 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:00 ` Danny Kukawka 2012-02-01 19:40 ` David Miller 2 siblings, 1 reply; 12+ 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] 12+ 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; 12+ 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] 12+ messages in thread
end of thread, other threads:[~2012-02-02 18:25 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <1327960820-11867-1-git-send-email-danny.kukawka@bisect.de> 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 11/16] ath5k: make ath5k_modparam_no_hw_rfkill_switch real Danny Kukawka 2012-01-30 22:11 ` Jiri Slaby [not found] ` <4F2715A7.9030101-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2012-01-30 23:09 ` Danny Kukawka 2012-01-30 22:00 ` [PATCH 14/16] hamradio: fix incompatible pointer in module parameter Danny Kukawka 2012-02-01 19:40 ` David Miller
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).