All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aravind Gopalakrishnan <aravind.gopalakrishnan@amd.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Thomas Lendacky <Thomas.Lendacky@amd.com>,
	andrew.cooper3@citrix.com,
	Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>,
	sherry.hurwitz@amd.com,
	xen-devel <xen-devel@lists.xenproject.org>,
	shurd@broadcom.com
Subject: Re: [PATCH V6] ns16550: Add support for UART present in Broadcom TruManage capable NetXtreme chips
Date: Tue, 3 Dec 2013 10:37:16 -0600	[thread overview]
Message-ID: <529E08BC.20508@amd.com> (raw)
In-Reply-To: <529DBE8A0200007800109420@nat28.tlf.novell.com>

On 12/3/2013 4:20 AM, Jan Beulich wrote:
>>>> On 02.12.13 at 19:32, Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com> wrote:
>> @@ -434,7 +477,21 @@ static void __init ns16550_endboot(struct serial_port *port)
>>       struct ns16550 *uart = port->uart;
>>   
>>       if ( uart->remapped_io_base )
>> +    {
>> +        if ( uart->enable_ro ) {
>> +            if ( rangeset_add_range(mmio_ro_ranges,
>> +                                    uart->io_base,
>> +                                    uart->io_base + uart->io_size - 1) )
>> +               WARN();
>> +
>> +            if ( pci_ro_device(0, uart->ps_bdf[0],
>> +                               PCI_DEVFN(uart->ps_bdf[1], uart->ps_bdf[2])) )
>> +                WARN();
>> +
> Stray blank line.
>
> Also, for neither of the two WARN()s above the resulting stack trace
> is really meaningful. A simple printk() would therefore suffice.
> But, more importantly, did you overlook the use of pci_hide_device()
> in ns16550_init_postirq(): The hiding should be done in one place.
> And with pci_ro_device() implicitly hiding the device, you should
> probably make sure you call just one of the two.

Yes, fixed this...

>> +                        /*
>> +                         * Set enable_ro flag to 1 to
>> +                         * make device and MMIO region read only
>> +                         */
>> +                        uart->enable_ro = 1;
>> +                        break;
> So in the comment with the field declaration you say this is
> optional, as if the user had a choice. Since the selection is made
> internally, I don't think you should comment it that way.

Ok, I have reworded this in V7.

> Furthermore, with the way you use it the field should clearly be
> bool_t.

Fixed this.

Sending out V7.

Thanks,
-Aravind.

      reply	other threads:[~2013-12-03 16:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-02 18:32 [PATCH V6] ns16550: Add support for UART present in Broadcom TruManage capable NetXtreme chips Aravind Gopalakrishnan
2013-12-03 10:20 ` Jan Beulich
2013-12-03 16:37   ` Aravind Gopalakrishnan [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=529E08BC.20508@amd.com \
    --to=aravind.gopalakrishnan@amd.com \
    --cc=JBeulich@suse.com \
    --cc=Suravee.Suthikulpanit@amd.com \
    --cc=Thomas.Lendacky@amd.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=sherry.hurwitz@amd.com \
    --cc=shurd@broadcom.com \
    --cc=xen-devel@lists.xenproject.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.