Message ID | 20210206151348.14530-1-uwe@kleine-koenig.org (mailing list archive) |
---|---|
State | Mainlined |
Commit | 464956f75e9e26bcbbcbef435213e8f5fa854d07 |
Delegated to: | Jiri Kosina |
Headers | show |
Series | [v1,1/3] HID: intel-ish-hid: Drop if block with an always false condition | expand |
On Sat, 6 Feb 2021, Uwe Kleine-König wrote: > A remove callback is only ever called for a bound device. So there is no > need to check for device or driver being NULL. Srinivas, any objections to this patchset? The cleanups look good to me. Thanks,
On Mon, 2021-03-08 at 11:07 +0100, Jiri Kosina wrote: > On Sat, 6 Feb 2021, Uwe Kleine-König wrote: > > > A remove callback is only ever called for a bound device. So there > > is no > > need to check for device or driver being NULL. > > Srinivas, any objections to this patchset? The cleanups look good to > me. Sorry, I missed this series. No objection for taking these patches. Thanks, Srinivas > Thanks, >
On Mon, 8 Mar 2021, Srinivas Pandruvada wrote: > > > A remove callback is only ever called for a bound device. So there > > > is no > > > need to check for device or driver being NULL. > > > > Srinivas, any objections to this patchset? The cleanups look good to > > me. > Sorry, I missed this series. > No objection for taking these patches. Thanks. Applied with your Acked-by: If you disagree with that interpretation of your statement above, please holler :) Thanks,
On Mon, 2021-03-08 at 17:16 +0100, Jiri Kosina wrote: > On Mon, 8 Mar 2021, Srinivas Pandruvada wrote: > > > > > A remove callback is only ever called for a bound device. So > > > > there > > > > is no > > > > need to check for device or driver being NULL. > > > > > > Srinivas, any objections to this patchset? The cleanups look good > > > to > > > me. > > Sorry, I missed this series. > > No objection for taking these patches. > > Thanks. Applied with your Acked-by: > If you disagree with that interpretation of your statement above, > please > holler :) I agree. For record: Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Thanks, Srinivas > > Thanks, >
Hello Jiri, On 3/8/21 5:16 PM, Jiri Kosina wrote: > On Mon, 8 Mar 2021, Srinivas Pandruvada wrote: > >>>> A remove callback is only ever called for a bound device. So there >>>> is no >>>> need to check for device or driver being NULL. >>> >>> Srinivas, any objections to this patchset? The cleanups look good to >>> me. >> Sorry, I missed this series. >> No objection for taking these patches. > > Thanks. Applied with your Acked-by: > If you disagree with that interpretation of your statement above, please > holler :) I expected these patches to go in during the 5.13 merge window, but they didn't. I found your pull request for 5.13 (https://lore.kernel.org/lkml/nycvar.YFH.7.76.2104292151220.18270@cbobk.fhfr.pm/) and they were not included there even though the patches were in next since at least next-20210310. Looking at git log --oneline --cherry v5.13-rc1...dce6a0d56a7719efcad438f5c46a9d192fd36a89 (where dce.. was the tip of your for-next for next-20210506 (i.e. before 5.13-rc1 was cut)) and it seems there are quite a few more commits that didn't make it into your pull request. What am I missing? Best regards Uwe
On Mon, 10 May 2021, Uwe Kleine-König wrote: > I expected these patches to go in during the 5.13 merge window, but they > didn't. I found your pull request for 5.13 > (https://lore.kernel.org/lkml/nycvar.YFH.7.76.2104292151220.18270@cbobk.fhfr.pm/) > and they were not included there even though the patches were in next since at > least next-20210310. Looking at > > git log --oneline --cherry > v5.13-rc1...dce6a0d56a7719efcad438f5c46a9d192fd36a89 > > (where dce.. was the tip of your for-next for next-20210506 (i.e. before > 5.13-rc1 was cut)) and it seems there are quite a few more commits that didn't > make it into your pull request. > > What am I missing? You are missing the fact that I am a halfwit and I screwed up the merge :) for-5.13/intel-ish branch by mistake didn't make it into final for-linus unfortunately, due to my mistake. Thanks a lot for pointing it out, I will fix that up.
diff --git a/drivers/hid/intel-ish-hid/ishtp/bus.c b/drivers/hid/intel-ish-hid/ishtp/bus.c index bba29cd36d29..ccd54f244503 100644 --- a/drivers/hid/intel-ish-hid/ishtp/bus.c +++ b/drivers/hid/intel-ish-hid/ishtp/bus.c @@ -257,17 +257,13 @@ static int ishtp_cl_bus_match(struct device *dev, struct device_driver *drv) static int ishtp_cl_device_remove(struct device *dev) { struct ishtp_cl_device *device = to_ishtp_cl_device(dev); - struct ishtp_cl_driver *driver; - - if (!device || !dev->driver) - return 0; + struct ishtp_cl_driver *driver = to_ishtp_cl_driver(dev->driver); if (device->event_cb) { device->event_cb = NULL; cancel_work_sync(&device->event_work); } - driver = to_ishtp_cl_driver(dev->driver); if (!driver->remove) { dev->driver = NULL;
A remove callback is only ever called for a bound device. So there is no need to check for device or driver being NULL. Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> --- drivers/hid/intel-ish-hid/ishtp/bus.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) base-commit: 5c8fe583cce542aa0b84adc939ce85293de36e5e