On Wed, Nov 27, 2013 at 09:38:02PM +0800, ZHAO Gang wrote:
> On Wed, Nov 27, 2013 at 6:13 PM, Dan Carpenter <dan.carpen...@oracle.com> 
> wrote:
> > On Wed, Nov 27, 2013 at 03:45:14PM +0800, ZHAO Gang wrote:
> >> fix make -W1 warning:
> >> drivers/staging/et131x//et131x.c: In function 
> >> ‘et1310_setup_device_for_multicast’:
> >> drivers/staging/et131x//et131x.c:1055:6: warning: variable ‘pm_csr’ set 
> >> but not used [-Wunused-but-set-variable]
> >>   u32 pm_csr;
> >>       ^
> >> drivers/staging/et131x//et131x.c: In function 
> >> ‘et1310_setup_device_for_unicast’:
> >> drivers/staging/et131x//et131x.c:1104:6: warning: variable ‘pm_csr’ set 
> >> but not used [-Wunused-but-set-variable]
> >>   u32 pm_csr;
> >>       ^
> >> drivers/staging/et131x//et131x.c: In function ‘et131x_isr_handler’:
> >> drivers/staging/et131x//et131x.c:4009:8: warning: variable ‘pm_csr’ set 
> >> but not used [-Wunused-but-set-variable]
> >>     u32 pm_csr;
> >>         ^
> >
> > Did you test these?  Sometimes hardware requires stupid stuff like
> > dummy reads...
> >
> 
> I don't have the hardware to test it. :( I looked the other part of
> the code, the device seems don't need a special read before write, if
> it does, we can change the code to just read and don't use a variable
> to store the read return value.

You are probably right.  The original code seems like accidental.  Let's
just remove it.  If someone complains we will add it back as a function.

regards,
dan carpenter
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to