lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 9 Jul 2012 20:25:30 +0200
From:	David Herrmann <dh.herrmann@...glemail.com>
To:	Joe Perches <joe@...ches.com>
Cc:	linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
	florianschandinat@....de, linux-fbdev@...r.kernel.org,
	gregkh@...uxfoundation.org, alan@...rguk.ukuu.org.uk,
	bonbons@...ux-vserver.org
Subject: Re: [PATCH v2 09/11] fblog: register console driver

Hi Joe

On Mon, Jul 9, 2012 at 12:09 AM, Joe Perches <joe@...ches.com> wrote:
> On Sun, 2012-07-08 at 23:56 +0200, David Herrmann wrote:
>> We want to print the kernel log to all FBs so we need a console driver.
>> This registers the driver on startup and writes all messages to all
>> registered fblog instances.
>
> Hi David.  Trivia only:
>
>> diff --git a/drivers/video/console/fblog.c b/drivers/video/console/fblog.c
> []
>> @@ -47,6 +71,107 @@ static struct fblog_fb *fblog_fbs[FB_MAX];
>>  static bool active = 1;
>>
>>  #define to_fblog_dev(_d) container_of(_d, struct fblog_fb, dev)
>> +#define FBLOG_STR(x) x, sizeof(x) - 1
>
> That's a rather ugly macro.

But handy ;) I've removed it and replaced the call below with a local
variable which works fine too and seems to be even shorter than with
this macro.

>> +static void fblog_buf_resize(struct fblog_buf *buf, size_t width,
>> +                          size_t height)
>> +{
>> +     u16 **lines = NULL;
>> +     size_t i, j, minw, minh;
>> +
>> +     if (buf->height == height && buf->width == width)
>> +             return;
>> +
>> +     if (width && height) {
>> +             lines = kzalloc(height * sizeof(char*), GFP_KERNEL);
>
> sizeof(char *) is a bit more kernel style like.

Thanks, both fixed.
David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ