From: Ladislav Michl <ladis@linux-mips.org>
To: linux-fbdev@vger.kernel.org
Subject: Re: [PATCH v3] video: udlfb: Switch from the pr_*() to the dev_*() logging functions
Date: Mon, 15 Jan 2018 16:18:57 +0000 [thread overview]
Message-ID: <20180115161857.GA9434@lenoch> (raw)
In-Reply-To: <20180115154027.GA2455@lenoch>
On Mon, Jan 15, 2018 at 05:01:30PM +0100, Bartlomiej Zolnierkiewicz wrote:
> On Monday, January 15, 2018 04:40:27 PM Ladislav Michl wrote:
> > Use dev_err() and dev_info() instead of pr_err() and pr_info().
> > USB device is used as argument to dev_*() functions for probe
> > and urb manipulation, FB device for framebuffer related info.
> >
> > Also noisy device probe output was partly removed as idVendor,
> > idProduct, name and serial are already printed by usb core,
> > and partly turned into debug output.
> >
> > Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
> > ---
> > Changes:
> > - v2: Moved warnings removal into separate patch
> > - v3: Fixed warning about ignored return value, fixed space
> > before end of comment text, fixed few checkpatch warnings
> >
> > drivers/video/fbdev/udlfb.c | 232 ++++++++++++++++++++++----------------------
> > 1 file changed, 116 insertions(+), 116 deletions(-)
>
> [...]
>
> > @@ -1455,7 +1452,7 @@ static const struct bin_attribute edid_attr = {
> > .write = edid_store
> > };
> >
> > -static struct device_attribute fb_device_attrs[] = {
> > +static const struct device_attribute fb_device_attrs[] = {
>
> This has been introduced in v3 and should be in a separate pre-patch.
Well, as I hadn't the same toolchain installed I didn't want to risk another
warning. Members of this structure are assigned to the const pointer later.
I'll take opportunity and constify some more pointers.
> > __ATTR_RO(metrics_bytes_rendered),
> > __ATTR_RO(metrics_bytes_identical),
> > __ATTR_RO(metrics_bytes_sent),
>
> [...]
>
> > @@ -1569,56 +1568,46 @@ static int dlfb_parse_vendor_descriptor(struct dlfb_data *dlfb,
> >
> > static void dlfb_init_framebuffer_work(struct work_struct *work);
> >
> > -static int dlfb_usb_probe(struct usb_interface *interface,
> > - const struct usb_device_id *id)
> > +static int dlfb_usb_probe(struct usb_interface *intf,
> > + const struct usb_device_id *id)
> > {
> > - struct usb_device *usbdev;
> > struct dlfb_data *dlfb;
> > int retval = -ENOMEM;
> > + struct usb_device *usbdev = interface_to_usbdev(intf);
> >
> > /* usb initialization */
> > -
> > - usbdev = interface_to_usbdev(interface);
> > -
> > dlfb = kzalloc(sizeof(*dlfb), GFP_KERNEL);
> > - if (dlfb = NULL) {
> > - dev_err(&interface->dev, "dlfb_usb_probe: failed alloc of dev struct\n");
>
> This dev_err() removal has been introduced in v3 and I believe that
> it should be reversed (according to previous request of not deleting
> allocation error messages).
Reversed (it is the only allocation failure point in this function, so it
should be clear where it failed, but let's leave it here)
> > + if (!dlfb)
> > goto error;
> > - }
>
> The rest looks fine.
>
> Best regards,
> --
> Bartlomiej Zolnierkiewicz
> Samsung R&D Institute Poland
> Samsung Electronics
prev parent reply other threads:[~2018-01-15 16:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-15 15:40 [PATCH v3] video: udlfb: Switch from the pr_*() to the dev_*() logging functions Ladislav Michl
2018-01-15 16:01 ` Bartlomiej Zolnierkiewicz
2018-01-15 16:18 ` Ladislav Michl [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180115161857.GA9434@lenoch \
--to=ladis@linux-mips.org \
--cc=linux-fbdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.