Message ID | 20180109093744.egp4vynjgghidp6i@mwanda (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Jan 09, 2018 at 12:37:44PM +0300, Dan Carpenter wrote: > We should be using "status2" here instead of "status". This is already fixed by commit: Author: Wei Yongjun <weiyongjun1@huawei.com> Date: Mon Jan 8 22:22:44 2018 +0530 soundwire: Fix typo in return value check of sdw_read() Fix the typo, 'status' should be instead of 'status2'. > > Fixes: b0a9c37b0178 ("soundwire: Add slave status handling") > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> > > diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c > index ac88031f7664..a5d41a4a1609 100644 > --- a/drivers/soundwire/bus.c > +++ b/drivers/soundwire/bus.c > @@ -741,10 +741,10 @@ static int sdw_handle_port_interrupt(struct sdw_slave *slave, > > /* Read DPN interrupt again */ > status2 = sdw_read(slave, addr); > - if (status < 0) { > + if (status2 < 0) { > dev_err(slave->bus->dev, > - "SDW_DPN_INT read failed:%d", status); > - return status; > + "SDW_DPN_INT read failed:%d", status2); > + return status2; > } > status &= status2; >
On Wed, Jan 10, 2018 at 04:25:44PM +0530, Vinod Koul wrote: > On Tue, Jan 09, 2018 at 12:37:44PM +0300, Dan Carpenter wrote: > > We should be using "status2" here instead of "status". > > This is already fixed by commit: > > Author: Wei Yongjun <weiyongjun1@huawei.com> > Date: Mon Jan 8 22:22:44 2018 +0530 > > soundwire: Fix typo in return value check of sdw_read() > > Fix the typo, 'status' should be instead of 'status2'. > Hi Wei, It looks like you're fixing static checker warnings? Could you CC kernel-janitors@vger.kernel.org for those fixes? Otherwise we end up sending duplicates a lot. Colin King, Julia Lawall, Christophe JAILLET, and I all CC our static checker fixes to kernel-janitors. I still end up sending duplicates sometimes... Which is fine. regards, dan carpenter
Hi Dan Carpenter > > > Hi Wei, > > It looks like you're fixing static checker warnings? Could you CC > kernel-janitors@vger.kernel.org for those fixes? Otherwise we end up > sending duplicates a lot. > > Colin King, Julia Lawall, Christophe JAILLET, and I all CC our static > checker fixes to kernel-janitors. I still end up sending duplicates > sometimes... Which is fine. Yes, I am running a static checker. I will CC kernel-janitors@vger.kernel.org for those later patches. Regards, Yongjun Wei
diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index ac88031f7664..a5d41a4a1609 100644 --- a/drivers/soundwire/bus.c +++ b/drivers/soundwire/bus.c @@ -741,10 +741,10 @@ static int sdw_handle_port_interrupt(struct sdw_slave *slave, /* Read DPN interrupt again */ status2 = sdw_read(slave, addr); - if (status < 0) { + if (status2 < 0) { dev_err(slave->bus->dev, - "SDW_DPN_INT read failed:%d", status); - return status; + "SDW_DPN_INT read failed:%d", status2); + return status2; } status &= status2;
We should be using "status2" here instead of "status". Fixes: b0a9c37b0178 ("soundwire: Add slave status handling") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>