linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
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:01:30 +0000	[thread overview]
Message-ID: <2132847.KgnqgFlo3Q@amdc3058> (raw)
In-Reply-To: <20180115154027.GA2455@lenoch>

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.

>  	__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).

> +	if (!dlfb)
>  		goto error;
> -	}

The rest looks fine.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics


  reply	other threads:[~2018-01-15 16:01 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 [this message]
2018-01-15 16:18 ` Ladislav Michl

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=2132847.KgnqgFlo3Q@amdc3058 \
    --to=b.zolnierkie@samsung.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).