RE: [HPDD-discuss] [PATCH] staging: lustre: lustre: obdclass: lprocfs_status.c: Fix for possible null pointer dereference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Strongly agreed that execution speed is not critical here.  It's the update of a proc variable, not a tight loop or critical section.

Normally I'd leave it alone, but since you're writing a patch anyway, I'd do 'tolower' myself.  I dislike the stacked case statements on a single line like that.  (It's the only time I've seen them written that way.  Perhaps it's common and I've just missed it.)

Regards,
- Patrick
________________________________________
From: HPDD-discuss [hpdd-discuss-bounces@xxxxxxxxxxxx] on behalf of Joe Perches [joe@xxxxxxxxxxx]
Sent: Monday, December 15, 2014 5:53 PM
To: Rickard Strandqvist
Cc: devel@xxxxxxxxxxxxxxxxxxxx; Fabian Frederick; Julia Lawall; James Simmons; Greg Kroah-Hartman; linux-kernel@xxxxxxxxxxxxxxx; Greg Donald; HPDD-discuss@xxxxxxxxxxxx; Andriy Skulysh
Subject: Re: [HPDD-discuss] [PATCH] staging: lustre: lustre: obdclass: lprocfs_status.c: Fix for possible null pointer dereference

On Mon, 2014-12-15 at 23:23 +0100, Rickard Strandqvist wrote:
> Hi Joe

Hello Rickard

> No, it does not look like end can be NULL then.
> Then remove the end != NULL instead?
> ...
>     if (end != NULL && *end == '.') {

Up to you.

> However, I am hesitant to the tolower()  I think double case is faster...?

I doubt code execution speed is paramount here.
Maybe see if the object code size is smaller one
way or the other.


_______________________________________________
HPDD-discuss mailing list
HPDD-discuss@xxxxxxxxxxxx
https://lists.01.org/mailman/listinfo/hpdd-discuss
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux