public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Li Zefan <lizf@cn.fujitsu.com>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mxser: fix compile warning building without CONFIG_PCI
Date: Sun, 03 Feb 2008 14:20:26 +0800	[thread overview]
Message-ID: <47A55D2A.2070902@cn.fujitsu.com> (raw)
In-Reply-To: <47A55C5E.70305@gmail.com>

Jiri Slaby wrote:
> On 02/03/2008 03:59 AM, Li Zefan wrote:
>> When build without CONFIG_PIC, got the following warnings:
>>
>> drivers/char/mxser.c: In function 'mxser_init':
>> drivers/char/mxser.c:698: warning: unused variable 'devnum'
>> drivers/char/mxser.c:698: warning: unused variable 'busnum'
>> drivers/char/mxser.c:697: warning: unused variable 'index'
>> drivers/char/mxser.c:696: warning: unused variable 'pdev'
>> drivers/char/mxser.c:695: warning: unused variable 'n'
>>
>> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
>> ---
>>  drivers/char/mxser.c |   14 ++++++--------
>>  1 files changed, 6 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c
>> index fd0abef..b2cc93d 100644
>> --- a/drivers/char/mxser.c
>> +++ b/drivers/char/mxser.c
>> @@ -692,10 +692,7 @@ static int mxser_get_PCI_conf(int busnum, int
>> devnum, int board_type, struct mxs
>>  
>>  static int mxser_init(void)
>>  {
>> -    int i, m, retval, b, n;
>> -    struct pci_dev *pdev = NULL;
>> -    int index;
>> -    unsigned char busnum, devnum;
>> +    int i, m, retval, b;
>>      struct mxser_hwconf hwconf;
>>  
>>      mxvar_sdriver = alloc_tty_driver(MXSER_PORTS + 1);
>> @@ -834,10 +831,11 @@ static int mxser_init(void)
>>  
>>      /* start finding PCI board here */
>>  #ifdef CONFIG_PCI
>> -    n = ARRAY_SIZE(mxser_pcibrds) - 1;
>> -    index = 0;
>>      b = 0;
>> -    while (b < n) {
>> +    while (b < ARRAY_SIZE(mxser_pcibrds)-1) {
>> +        unsigned char busnum, devnum;
>> +        struct pci_dev *pdev;
>> +
>>          pdev = pci_get_device(mxser_pcibrds[b].vendor,
>>                  mxser_pcibrds[b].device, pdev);
>>          if (pdev == NULL) {
> 
> This version of driver is no longer in -mm.
> 

I didn't know this, so just silently ignore this patch. :)

      reply	other threads:[~2008-02-03  6:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-03  2:59 [PATCH] mxser: fix compile warning building without CONFIG_PCI Li Zefan
2008-02-03  6:17 ` Jiri Slaby
2008-02-03  6:20   ` Li Zefan [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=47A55D2A.2070902@cn.fujitsu.com \
    --to=lizf@cn.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=jirislaby@gmail.com \
    --cc=linux-kernel@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