Message ID | e0e35421-8746-43b6-971e-e25d1cd1d6a7@kili.mountain (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/udl: delete dead code | expand |
Hi Am 02.05.23 um 14:59 schrieb Dan Carpenter: > The "unode" pointer cannot be NULL here and checking for it causes > Smatch warnings: > > drivers/gpu/drm/udl/udl_main.c:259 udl_get_urb_locked() > warn: can 'unode' even be NULL? > > Fortunately, it's just harmless dead code which can be removed. It's > left over from commit c5c354a3a472 ("drm/udl: Fix inconsistent urbs.count > value during udl_free_urb_list()"). > > Reported-by: kernel test robot <lkp@intel.com> > Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> > --- > drivers/gpu/drm/udl/udl_main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/udl/udl_main.c b/drivers/gpu/drm/udl/udl_main.c > index 061cb88c08a2..3ebe2ce55dfd 100644 > --- a/drivers/gpu/drm/udl/udl_main.c > +++ b/drivers/gpu/drm/udl/udl_main.c > @@ -255,7 +255,7 @@ static struct urb *udl_get_urb_locked(struct udl_device *udl, long timeout) > list_del_init(&unode->entry); > udl->urbs.available--; > > - return unode ? unode->urb : NULL; > + return unode->urb; Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Thanks a lot. If no one complains, I'll add the patch to drm-misc-next soon. Best regards Thomas > } > > #define GET_URB_TIMEOUT HZ
On Tue, 02 May 2023 14:59:56 +0200, Dan Carpenter wrote: > > The "unode" pointer cannot be NULL here and checking for it causes > Smatch warnings: > > drivers/gpu/drm/udl/udl_main.c:259 udl_get_urb_locked() > warn: can 'unode' even be NULL? > > Fortunately, it's just harmless dead code which can be removed. It's > left over from commit c5c354a3a472 ("drm/udl: Fix inconsistent urbs.count > value during udl_free_urb_list()"). > > Reported-by: kernel test robot <lkp@intel.com> > Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Takashi Iwai <tiwai@suse.de> thanks, Takashi
Merged, thanks! Am 02.05.23 um 14:59 schrieb Dan Carpenter: > The "unode" pointer cannot be NULL here and checking for it causes > Smatch warnings: > > drivers/gpu/drm/udl/udl_main.c:259 udl_get_urb_locked() > warn: can 'unode' even be NULL? > > Fortunately, it's just harmless dead code which can be removed. It's > left over from commit c5c354a3a472 ("drm/udl: Fix inconsistent urbs.count > value during udl_free_urb_list()"). > > Reported-by: kernel test robot <lkp@intel.com> > Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> > --- > drivers/gpu/drm/udl/udl_main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/udl/udl_main.c b/drivers/gpu/drm/udl/udl_main.c > index 061cb88c08a2..3ebe2ce55dfd 100644 > --- a/drivers/gpu/drm/udl/udl_main.c > +++ b/drivers/gpu/drm/udl/udl_main.c > @@ -255,7 +255,7 @@ static struct urb *udl_get_urb_locked(struct udl_device *udl, long timeout) > list_del_init(&unode->entry); > udl->urbs.available--; > > - return unode ? unode->urb : NULL; > + return unode->urb; > } > > #define GET_URB_TIMEOUT HZ
diff --git a/drivers/gpu/drm/udl/udl_main.c b/drivers/gpu/drm/udl/udl_main.c index 061cb88c08a2..3ebe2ce55dfd 100644 --- a/drivers/gpu/drm/udl/udl_main.c +++ b/drivers/gpu/drm/udl/udl_main.c @@ -255,7 +255,7 @@ static struct urb *udl_get_urb_locked(struct udl_device *udl, long timeout) list_del_init(&unode->entry); udl->urbs.available--; - return unode ? unode->urb : NULL; + return unode->urb; } #define GET_URB_TIMEOUT HZ
The "unode" pointer cannot be NULL here and checking for it causes Smatch warnings: drivers/gpu/drm/udl/udl_main.c:259 udl_get_urb_locked() warn: can 'unode' even be NULL? Fortunately, it's just harmless dead code which can be removed. It's left over from commit c5c354a3a472 ("drm/udl: Fix inconsistent urbs.count value during udl_free_urb_list()"). Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> --- drivers/gpu/drm/udl/udl_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)