From: "Frank Schäfer" <fschaefer.oss@googlemail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
Mauro Carvalho Chehab <m.chehab@samsung.com>
Cc: linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] [media] em28xx-cards: don't print a misleading message
Date: Mon, 24 Feb 2014 18:04:05 +0000 [thread overview]
Message-ID: <530B8995.8030807@googlemail.com> (raw)
In-Reply-To: <20140217200419.GB9845@elgon.mountain>
Am 17.02.2014 21:04, schrieb Dan Carpenter:
> There were some missing curly braces so it always says that the transfer
> mode changed even if it didn't.
It's not a transfer mode change, it's the initial selection (which never
changes).
The intention of this section is to print which interface (type) is
choosen for analog video.
The same is done for digital video (DVB) a few lines later.
I think we should just switch from info to debug level.
> Also the indenting uses spaces instead
> of tabs.
Yes, indenting is wrong and that's what causes the confusion here. ;-)
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c
> index 4d97a76cc3b0..e8eedd35eea5 100644
> --- a/drivers/media/usb/em28xx/em28xx-cards.c
> +++ b/drivers/media/usb/em28xx/em28xx-cards.c
> @@ -3329,10 +3329,11 @@ static int em28xx_usb_probe(struct usb_interface *interface,
>
> /* Select USB transfer types to use */
> if (has_video) {
> - if (!dev->analog_ep_isoc || (try_bulk && dev->analog_ep_bulk))
> - dev->analog_xfer_bulk = 1;
> - em28xx_info("analog set to %s mode.\n",
> - dev->analog_xfer_bulk ? "bulk" : "isoc");
> + if (!dev->analog_ep_isoc || (try_bulk && dev->analog_ep_bulk)) {
> + dev->analog_xfer_bulk = 1;
> + em28xx_info("analog set to %s mode.\n",
> + dev->analog_xfer_bulk ? "bulk" : "isoc");
Now you will never hit the "isoc" path.
Regards,
Frank
> + }
> }
> if (has_dvb) {
> if (!dev->dvb_ep_isoc || (try_bulk && dev->dvb_ep_bulk))
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: "Frank Schäfer" <fschaefer.oss@googlemail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
Mauro Carvalho Chehab <m.chehab@samsung.com>
Cc: linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] [media] em28xx-cards: don't print a misleading message
Date: Mon, 24 Feb 2014 19:04:05 +0100 [thread overview]
Message-ID: <530B8995.8030807@googlemail.com> (raw)
In-Reply-To: <20140217200419.GB9845@elgon.mountain>
Am 17.02.2014 21:04, schrieb Dan Carpenter:
> There were some missing curly braces so it always says that the transfer
> mode changed even if it didn't.
It's not a transfer mode change, it's the initial selection (which never
changes).
The intention of this section is to print which interface (type) is
choosen for analog video.
The same is done for digital video (DVB) a few lines later.
I think we should just switch from info to debug level.
> Also the indenting uses spaces instead
> of tabs.
Yes, indenting is wrong and that's what causes the confusion here. ;-)
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c
> index 4d97a76cc3b0..e8eedd35eea5 100644
> --- a/drivers/media/usb/em28xx/em28xx-cards.c
> +++ b/drivers/media/usb/em28xx/em28xx-cards.c
> @@ -3329,10 +3329,11 @@ static int em28xx_usb_probe(struct usb_interface *interface,
>
> /* Select USB transfer types to use */
> if (has_video) {
> - if (!dev->analog_ep_isoc || (try_bulk && dev->analog_ep_bulk))
> - dev->analog_xfer_bulk = 1;
> - em28xx_info("analog set to %s mode.\n",
> - dev->analog_xfer_bulk ? "bulk" : "isoc");
> + if (!dev->analog_ep_isoc || (try_bulk && dev->analog_ep_bulk)) {
> + dev->analog_xfer_bulk = 1;
> + em28xx_info("analog set to %s mode.\n",
> + dev->analog_xfer_bulk ? "bulk" : "isoc");
Now you will never hit the "isoc" path.
Regards,
Frank
> + }
> }
> if (has_dvb) {
> if (!dev->dvb_ep_isoc || (try_bulk && dev->dvb_ep_bulk))
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-02-24 18:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-17 20:04 [patch] [media] em28xx-cards: don't print a misleading message Dan Carpenter
2014-02-17 20:04 ` Dan Carpenter
2014-02-24 18:04 ` Frank Schäfer [this message]
2014-02-24 18:04 ` Frank Schäfer
2014-02-24 18:13 ` Dan Carpenter
2014-02-24 18:13 ` Dan Carpenter
2014-03-05 11:09 ` [patch v2] [patch] [media] em28xx-cards: remove a wrong indent level Dan Carpenter
2014-03-05 11:09 ` Dan Carpenter
2014-03-07 16:46 ` Frank Schäfer
2014-03-07 16:46 ` Frank Schäfer
2014-03-07 17:01 ` Dan Carpenter
2014-03-07 17:01 ` Dan Carpenter
2014-04-30 9:36 ` [patch v3] [media] em28xx-cards: fix indenting in probe() Dan Carpenter
2014-04-30 9:36 ` Dan Carpenter
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=530B8995.8030807@googlemail.com \
--to=fschaefer.oss@googlemail.com \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=m.chehab@samsung.com \
/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.