[PATCH] usb: musb: fix compilation warning on unused function

2016-12-07 Thread Jérémy Lefaure
] static int musb_run_resume_work(struct musb *musb) ^~~~ Signed-off-by: Jérémy Lefaure --- I think that adding a preprocessor condition is a better way to fix this than moving the function into the scope of the existing condition to preserve the git history

[PATCH 0/2] usb: musb: blackfin: fix unused warnings

2016-12-16 Thread Jérémy Lefaure
I found three functions in blackfin.c defined but not used in some configurations. These patches fix these compilation warnings. [PATCH 1/2] usb: musb: blackfin: fix unused warnings on suspend/resume [PATCH 2/2] usb: musb: blackfin: add bfin_fifo_offset in bfin_ops -- To unsubscribe from this list

[PATCH 2/2] usb: musb: blackfin: add bfin_fifo_offset in bfin_ops

2016-12-16 Thread Jérémy Lefaure
t(u8 epnum) ^~~~ Adding bfin_fifo_offset to bfin_ops fixes this warning and allows musb core to call this function instead of default_fifo_offset. Signed-off-by: Jérémy Lefaure --- drivers/usb/musb/blackfin.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/musb/blackfin.c b/driver

[PATCH 1/2] usb: musb: blackfin: fix unused warnings on suspend/resume

2016-12-16 Thread Jérémy Lefaure
__maybe_unused. Signed-off-by: Jérémy Lefaure --- drivers/usb/musb/blackfin.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c index 310238c6b5cd..f43edc43268b 100644 --- a/drivers/usb/musb/blackfin.c +++ b/drivers/usb/musb

Re: [PATCH 1/2] usb: musb: blackfin: fix unused warnings on suspend/resume

2016-12-20 Thread Jérémy Lefaure
Hi Bin, On Mon, Dec 19, 2016 at 3:56 PM, Bin Liu wrote: > > On Fri, Dec 16, 2016 at 07:19:39PM -0500, Jérémy Lefaure wrote: > > When CONFIG_PM_SLEEP is disabled, SIMPLE_DEV_PM_OPS does not use > > bfin_resume and bfin_suspend even if CONFIG_PM is enabled: > > > > d

[PATCH v2] usb: musb: blackfin: add bfin_fifo_offset in bfin_ops

2016-12-22 Thread Jérémy Lefaure
From: Jérémy Lefaure The function bfin_fifo_offset is defined but not used: drivers/usb/musb/blackfin.c:36:12: warning: ‘bfin_fifo_offset’ defined but not used [-Wunused-function] static u32 bfin_fifo_offset(u8 epnum) ^~~~ Adding bfin_fifo_offset to bfin_ops fixes

Re: [PATCH 1/2] usb: musb: blackfin: fix unused warnings on suspend/resume

2016-12-29 Thread Jérémy Lefaure
On Mon, 19 Dec 2016 14:56:00 -0600 Bin Liu wrote: > On Fri, Dec 16, 2016 at 07:19:39PM -0500, Jérémy Lefaure wrote: > > When CONFIG_PM_SLEEP is disabled, SIMPLE_DEV_PM_OPS does not use > > bfin_resume and bfin_suspend even if CONFIG_PM is enabled: > > > > drivers

Re: [PATCH 00/18] use ARRAY_SIZE macro

2017-10-01 Thread Jérémy Lefaure
On Mon, 2 Oct 2017 09:01:31 +1100 "Tobin C. Harding" wrote: > > In order to reduce the size of the To: and Cc: lines, each patch of the > > series is sent only to the maintainers and lists concerned by the patch. > > This cover letter is sent to every list concerned by this series. > > Why don

Re: [PATCH 00/18] use ARRAY_SIZE macro

2017-10-02 Thread Jérémy Lefaure
On Mon, 2 Oct 2017 15:22:24 -0400 bfie...@fieldses.org (J. Bruce Fields) wrote: > Mainly I'd just like to know which you're asking for. Do you want me to > apply this, or to ACK it so someone else can? If it's sent as a series > I tend to assume the latter. > > But in this case I'm assuming it'

Re: [PATCH 05/18] net: use ARRAY_SIZE

2017-10-02 Thread Jérémy Lefaure
On Mon, 02 Oct 2017 16:46:29 +0300 Kalle Valo wrote: > We have a tree for wireless so usually it's better to submit wireless > changes on their own but here I assume Dave will apply this to his tree. > If not, please resubmit the wireless part in a separate patch. Ok, I note that. I'll wait Dave

Re: [PATCH 05/18] net: use ARRAY_SIZE

2017-10-02 Thread Jérémy Lefaure
On Mon, 2 Oct 2017 16:07:36 +0300 Andy Shevchenko wrote: > > + {&gainctrl_lut_core0_rev0, ARRAY_SIZE(gainctrl_lut_core0_rev0), 26, > > 192, > > +32}, > > For all such cases I would rather put on one line disregard checkpatch > warning for better readability. I agree that it woul

[PATCH 00/18] use ARRAY_SIZE macro

2017-10-01 Thread Jérémy Lefaure
Hi everyone, Using ARRAY_SIZE improves the code readability. I used coccinelle (I made a change to the array_size.cocci file [1]) to find several places where ARRAY_SIZE could be used instead of other macros or sizeof division. I tried to divide the changes into a patch per subsystem (excepted for

[PATCH 05/18] net: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
/sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure --- drivers/net/ethernet/emulex/benet/be_cmds.c| 4 +- drivers/net/ethernet/intel/i40e/i40e_adminq.h | 3 +- drivers/net/ethernet/intel/i40evf/i40e_adminq.h| 3