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]
Message-ID: <1394997876.5689.60.camel@joe-AO722>
Date:	Sun, 16 Mar 2014 12:24:36 -0700
From:	Joe Perches <joe@...ches.com>
To:	Daniel Ngu <daniel.dy.ngu@...il.com>
Cc:	Jonathan Kim <jonathankim@...semi.com>,
	Dean ahn <deanahn@...semi.com>, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Staging: gdm724x: gdm_lte.c: fixed coding style

On Mon, 2014-03-17 at 08:20 +1300, Daniel Ngu wrote:
> Line over 80 characters
> Unchecked sscanf return value
[]
> diff --git a/drivers/staging/gdm724x/gdm_lte.c b/drivers/staging/gdm724x/gdm_lte.c
[]
> @@ -536,7 +567,8 @@ static u8 find_dev_index(u32 nic_type)
>  	return index;
>  }
>  
> -static void gdm_lte_netif_rx(struct net_device *dev, char *buf, int len, int flagged_nic_type)
> +static void gdm_lte_netif_rx(struct net_device *dev, char *buf, int len,
> +			     int flagged_nic_type)
>  {
>  	u32 nic_type;
>  	struct nic *nic;
> @@ -551,28 +583,41 @@ static void gdm_lte_netif_rx(struct net_device *dev, char *buf, int len, int fla
[]
>  			struct dhcp_packet {

This one would be better fixed by moving the struct definition
out of this function altogether.

>  				u8 op;      /* BOOTREQUEST or BOOTREPLY */
> -				u8 htype;   /* hardware address type. 1 = 10mb ethernet */
> +				u8 htype;   /* hardware address type.
> +					       1 = 10mb ethernet */
>  				u8 hlen;    /* hardware address length */
>  				u8 hops;    /* used by relay agents only */
>  				u32 xid;    /* unique id */
> -				u16 secs;   /* elapsed since client began acquisition/renewal */
> +				u16 secs;   /* elapsed since client began
> +					       acquisition/renewal */
>  				u16 flags;  /* only one flag so far: */
> -				#define BROADCAST_FLAG 0x8000 /* "I need broadcast replies" */
> -				u32 ciaddr; /* client IP (if client is in BOUND, RENEW or REBINDING state) */
> +				#define BROADCAST_FLAG 0x8000 /* "I need
> +								 broadcast
> +								 replies" */
> +				u32 ciaddr; /* client IP (if client is in
> +					       BOUND, RENEW or REBINDING
> +					       state) */
>  				u32 yiaddr; /* 'your' (client) IP address */
> -				/* IP address of next server to use in bootstrap, returned in DHCPOFFER, DHCPACK by server */
> +				/* IP address of next server to use in
> +				 * bootstrap, returned in DHCPOFFER, DHCPACK by
> +				 * server */
>  				u32 siaddr_nip;
>  				u32 gateway_nip; /* relay agent IP address */
> -				u8 chaddr[16];   /* link-layer client hardware address (MAC) */
> +				u8 chaddr[16];   /* link-layer client hardware
> +						    address (MAC) */
>  				u8 sname[64];    /* server host name (ASCIZ) */
>  				u8 file[128];    /* boot file name (ASCIZ) */
> -				u32 cookie;      /* fixed first four option bytes (99,130,83,99 dec) */
> +				u32 cookie;      /* fixed first four option
> +						    bytes (99,130,83,99 dec) */
>  			} __packed;



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