lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <X9C0vOLZOnLZoPR8@pendragon.ideasonboard.com>
Date:   Wed, 9 Dec 2020 13:27:56 +0200
From:   Laurent Pinchart <laurent.pinchart@...asonboard.com>
To:     "Enrico Weigelt, metux IT consult" <info@...ux.net>
Cc:     linux-kernel@...r.kernel.org, balbi@...nel.org, leoyang.li@....com,
        linux-usb@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH] drivers: usb: gadget: prefer pr_*() functions over raw
 printk()

Hi Enrico,

On Wed, Dec 09, 2020 at 12:11:36PM +0100, Enrico Weigelt, metux IT consult wrote:
> On 08.12.20 16:54, Laurent Pinchart wrote:
> >> diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c
> >> index 2b893bceea45..4834fafb3f70 100644
> >> --- a/drivers/usb/gadget/udc/atmel_usba_udc.c
> >> +++ b/drivers/usb/gadget/udc/atmel_usba_udc.c
> >> @@ -1573,7 +1573,7 @@ static void usba_control_irq(struct usba_udc *udc, struct usba_ep *ep)
> >>  		 * generate or receive a reply right away. */
> >>  		usba_ep_writel(ep, CLR_STA, USBA_RX_SETUP);
> >>  
> >> -		/* printk(KERN_DEBUG "setup: %d: %02x.%02x\n",
> >> +		/* pr_debug("setup: %d: %02x.%02x\n",
> >>  			ep->state, crq.crq.bRequestType,
> >>  			crq.crq.bRequest); */
> > 
> > I wonder if this shouldn't be dropped instead, commented-out code isn't
> > very useful.
> 
> Indeed. Shall I send a separate patch for that ?

Yes, that would make sense.

> > When a pointer to a struct device is available, dev_err() would be much
> > better. That's however out of scope for this patch, but it would be nice
> > to address it. This would become
> > 
> > 		dev_err(&pdev->dev, "Check IRQ setup!\n");
> > 
> 
> You're right. I didn't check for that yet. I'll do it in a separate
> patch.

As most of the files touched by this patch are device drivers, dev_*()
functions should be used instead of pr_*() where possible. I'd recommend
a first patch that converts to dev_*(), and then a second patch that
converts the remaining printk()s, if any, to pr_*() in the contexts
where no struct device is available or can easily be made available.

-- 
Regards,

Laurent Pinchart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ