lkml.org 
[lkml]   [2014]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] tty: serial: serial_core.c: printk replacement
From
On Wed, Jul 30, 2014 at 8:07 PM, Jiri Slaby <jslaby@suse.cz> wrote:
> On 07/30/2014, 04:07 PM, Sudip Mukherjee wrote:
>> printk replaced with corresponding dev_*
>> fixed two broken user-visible strings used by the corresponding printk
>>
>>
>> Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
>> ---
>> drivers/tty/serial/serial_core.c | 19 ++++++++++---------
>> 1 file changed, 10 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
>> index 8bb19da..ef48d0f 100644
>> --- a/drivers/tty/serial/serial_core.c
>> +++ b/drivers/tty/serial/serial_core.c
> ...
>> @@ -1974,8 +1974,8 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport)
>> for (tries = 3; !ops->tx_empty(uport) && tries; tries--)
>> msleep(10);
>> if (!tries)
>> - printk(KERN_ERR "%s%s%s%d: Unable to drain "
>> - "transmitter\n",
>> + dev_err(uport->dev,
>> + "%s%s%s%d: Unable to drain transmitter\n",
>> uport->dev ? dev_name(uport->dev) : "",
>
> Hi, this does not look correct. You use uport->dev, but there is a test
> whether it is NULL in the parameters.
>
> You would have to investigate if and when uport->dev can be NULL and
> document it in the commit log above.

HI
Thanks for reviewing it . I am checking out all the cases in which
uport can be null and will resend the patch.

Thanks
Sudip

>
> thanks,
> --
> js
> suse labs


\
 
 \ /
  Last update: 2014-07-30 18:21    [W:0.042 / U:0.884 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site