Linux Media Controller development
 help / color / mirror / Atom feed
From: "André Roth" <neolynx@gmail.com>
To: Mauro Carvalho Chehab <m.chehab@samsung.com>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
	Mauro Carvalho Chehab <mchehab@infradead.org>
Subject: Re: [PATCH 2/3] [media] siano: Improve debug/info messages
Date: Fri, 13 Sep 2013 01:28:38 +0200	[thread overview]
Message-ID: <20130913012838.7238b80d@neutrino.exnihilo> (raw)
In-Reply-To: <1379016000-19577-3-git-send-email-m.chehab@samsung.com>

On Thu, 12 Sep 2013 16:59:59 -0300
Mauro Carvalho Chehab <m.chehab@samsung.com> wrote:

Tested-by: André Roth <neolynx@gmail.com>


> Some messages are not clear, some are debug data, but are
> shown as errors, and one message is duplicated.
> 
> Cleanup that mess in order to provide a cleaner log.
> 
> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
> ---
>  drivers/media/usb/siano/smsusb.c | 18 ++++++++++--------
>  1 file changed, 10 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/media/usb/siano/smsusb.c b/drivers/media/usb/siano/smsusb.c
> index 03761c6..74236b8 100644
> --- a/drivers/media/usb/siano/smsusb.c
> +++ b/drivers/media/usb/siano/smsusb.c
> @@ -209,8 +209,10 @@ static int smsusb_sendrequest(void *context, void *buffer, size_t size)
>  	struct sms_msg_hdr *phdr = (struct sms_msg_hdr *) buffer;
>  	int dummy;
>  
> -	if (dev->state != SMSUSB_ACTIVE)
> +	if (dev->state != SMSUSB_ACTIVE) {
> +		sms_debug("Device not active yet");
>  		return -ENOENT;
> +	}
>  
>  	sms_debug("sending %s(%d) size: %d",
>  		  smscore_translate_msg(phdr->msg_type), phdr->msg_type,
> @@ -445,14 +447,15 @@ static int smsusb_probe(struct usb_interface *intf,
>  	char devpath[32];
>  	int i, rc;
>  
> -	sms_info("interface number %d",
> +	sms_info("board id=%lu, interface number %d",
> +		 id->driver_info,
>  		 intf->cur_altsetting->desc.bInterfaceNumber);
>  
>  	if (sms_get_board(id->driver_info)->intf_num !=
>  	    intf->cur_altsetting->desc.bInterfaceNumber) {
> -		sms_err("interface number is %d expecting %d",
> -			sms_get_board(id->driver_info)->intf_num,
> -			intf->cur_altsetting->desc.bInterfaceNumber);
> +		sms_debug("interface %d won't be used. Expecting interface %d to popup",
> +			intf->cur_altsetting->desc.bInterfaceNumber,
> +			sms_get_board(id->driver_info)->intf_num);
>  		return -ENODEV;
>  	}
>  
> @@ -483,12 +486,11 @@ static int smsusb_probe(struct usb_interface *intf,
>  	}
>  	if ((udev->actconfig->desc.bNumInterfaces == 2) &&
>  	    (intf->cur_altsetting->desc.bInterfaceNumber == 0)) {
> -		sms_err("rom interface 0 is not used");
> +		sms_debug("rom interface 0 is not used");
>  		return -ENODEV;
>  	}
>  
>  	if (id->driver_info == SMS1XXX_BOARD_SIANO_STELLAR_ROM) {
> -		sms_info("stellar device was found.");
>  		snprintf(devpath, sizeof(devpath), "usb\\%d-%s",
>  			 udev->bus->busnum, udev->devpath);
>  		sms_info("stellar device was found.");
> @@ -498,7 +500,7 @@ static int smsusb_probe(struct usb_interface *intf,
>  	}
>  
>  	rc = smsusb_init_device(intf, id->driver_info);
> -	sms_info("rc %d", rc);
> +	sms_info("Device initialized with return code %d", rc);
>  	sms_board_load_modules(id->driver_info);
>  	return rc;
>  }

  reply	other threads:[~2013-09-12 23:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-12 19:59 [PATCH 0/3] Some improvements/fixes for Siano driver Mauro Carvalho Chehab
2013-09-12 19:59 ` [PATCH 1/3] [media] siano: Don't show debug messages as errors Mauro Carvalho Chehab
2013-09-12 23:28   ` André Roth
2013-09-12 19:59 ` [PATCH 2/3] [media] siano: Improve debug/info messages Mauro Carvalho Chehab
2013-09-12 23:28   ` André Roth [this message]
2013-09-12 20:00 ` [PATCH 3/3] [media] siano: Fix initialization for Stellar models Mauro Carvalho Chehab
2013-09-12 23:29   ` André Roth
2013-09-12 23:32   ` André Roth
2013-09-12 20:04 ` [PATCH 4/3] [media] siano: Use the default firmware for Stellar Mauro Carvalho Chehab
2013-09-12 23:33   ` André Roth
2013-09-12 23:35 ` [PATCH 0/3] Some improvements/fixes for Siano driver André Roth

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=20130913012838.7238b80d@neutrino.exnihilo \
    --to=neolynx@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    --cc=mchehab@infradead.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