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:	Fri, 4 Jan 2008 14:07:02 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Paolo Ciarrocchi <paolo.ciarrocchi@...il.com>
Cc:	Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] This patch to profile.c fixes a few errors reported by
	checkpatch.pl


* Paolo Ciarrocchi <paolo.ciarrocchi@...il.com> wrote:

> paolo@...lo-desktop:~/linux-2.6/kernel$ ../scripts/checkpatch.pl
> --file profile.c

that's OK.

> What I still don't understand are the following options:
>  --no-tree    => run without a kernel tree
>  --root       => path to the kernel tree root
> 
> Should I specify the path to the kernel tree root? If so, why?

it figures it out itself - if it cannot it will tell you.

> That said, the errors reported by checkpatch.pl are now:
> paolo@...lo-desktop:~/linux-2.6/kernel$ ../scripts/checkpatch.pl
> --terse --file profile.c |grep ERROR
> profile.c:128: ERROR: "foo * bar" should be "foo *bar"
> I just forgot to fix it, very trivial. Will do in a minute.
> 
> profile.c:460: ERROR: do not use assignment in if condition (+  if
> (!(entry = create_proc_entry("XXXXXXXXXXXXX", 0600, root_irq_dir))))
> profile.c:594: ERROR: do not use assignment in if condition (+  if
> (!(entry = create_proc_entry("XXXXXXX", S_IWUSR | S_IRUGO, NULL))))
> Here I need an hint ( or an example) about how to fix these two errors :-)

transform:

  if (!(x = y))

to:

  x = y
  if (!x)

i.e. take the implicit assignment out of the condition. (it's easy to 
mistake it for '==' while reviewing the code and forgetting about the 
assignment's side-effect)

	Ingo
--
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