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] [day] [month] [year] [list]
Date:	Sun, 28 Oct 2007 20:40:10 +0000
From:	Ralf Baechle <ralf@...ux-mips.org>
To:	Stephen Hemminger <shemminger@...ux-foundation.org>
Cc:	Thiemo Seufer <ths@...workno.de>, linux-mips@...ux-mips.org,
	netdev@...r.kernel.org
Subject: Re: [PATCH] Fix/Rewrite of the mipsnet driver

On Sun, Oct 28, 2007 at 01:22:04PM -0700, Stephen Hemminger wrote:

> > -#define MIPSNET_INTCTL_TXDONE     ((uint32_t)(1 <<  0))
> > -#define MIPSNET_INTCTL_RXDONE     ((uint32_t)(1 <<  1))
> > -#define MIPSNET_INTCTL_TESTBIT    ((uint32_t)(1 << 31))
> > -#define MIPSNET_INTCTL_ALLSOURCES	(MIPSNET_INTCTL_TXDONE | \
> > -					 MIPSNET_INTCTL_RXDONE | \
> > -					 MIPSNET_INTCTL_TESTBIT)
> 
> It is standard practice in the kernel to use u32 rather than uint32_t.

uint32_t has widely leaked in and as long as it's not used in headers
exported to userland is perfectly fine.  But if we want to achieve
consistence throughout the kernel it'll take a little witch hunt for
uint32_t and co.

> Also cast of shift is unneeded  (1u << 0) works fine.

Old sins of mipsnet.h which was just copied into mipsnet.c.  Or toothing
pains of a driver on its way to sanity.

  Ralf
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ