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:	Thu, 27 Nov 2014 18:27:13 +0100
From:	Luis de Bethencourt <luis@...ethencourt.com>
To:	Joe Perches <joe@...ches.com>
Cc:	linux-kernel@...r.kernel.org, gregkh@...uxfoundation.org,
	paul.gortmaker@...driver.com, eunb.song@...sung.com,
	aaro.koskinen@....fi, devel@...verdev.osuosl.org
Subject: Re: [PATCH v2] staging: octeon: Fix checkpatch warnings

On Thu, Nov 27, 2014 at 08:34:00AM -0800, Joe Perches wrote:
> On Thu, 2014-11-27 at 17:18 +0100, Luis de Bethencourt wrote:
> > Fixing 80 character limit warnings in octeon/ethernet-rx.c
> 
> Hello again Luis.
> 
> Another thing you might consider is to  align
> multiple line statements to the appropriate
> open parenthesis.

Sure :) I will do this and merge it into the patch in a few hours.

> 
> > diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c
> []
> > @@ -126,13 +127,15 @@ static inline int cvm_oct_check_rcv_error(cvmx_wqe_t *work)
> >  
> >  			if (*ptr == 0xd5) {
> >  				/*
> > -				  printk_ratelimited("Port %d received 0xd5 preamble\n", work->ipprt);
> > +				  printk_ratelimited("Port %d received 0xd5 preamble\n",
> > +					  work->ipprt);
> >  				 */
> 
> This is in a commented out block, but this
> would look better like:
> 
> 		printk_ratelimited("format",
> 				   args...);
> 

I agree. Thanks for the pointer.

> 
> > @@ -212,17 +215,20 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
> >  		did_work_request = 0;
> >  		if (work == NULL) {
> >  			union cvmx_pow_wq_int wq_int;
> > +
> >  			wq_int.u64 = 0;
> >  			wq_int.s.iq_dis = 1 << pow_receive_group;
> >  			wq_int.s.wq_int = 1 << pow_receive_group;
> >  			cvmx_write_csr(CVMX_POW_WQ_INT, wq_int.u64);
> >  			break;
> >  		}
> > -		pskb = (struct sk_buff **)(cvm_oct_get_buffer_ptr(work->packet_ptr) - sizeof(void *));
> > +		pskb = (struct sk_buff **)(cvm_oct_get_buffer_ptr(work->packet_ptr) -
> > +			sizeof(void *));
> 
> cvm_oct_get_buffer_ptr returns a void pointer
> so it doesn't need a cast.
> 
> a possible fix is just to remove the cast
> 
> 		pskb = cvm_oct_get_buffer_ptr(work->packet_ptr) - sizeof(void *);
> 
> >  		prefetch(pskb);
> 
> If the cast type above to a ** is to be believed,
> maybe this should be prefetch(*pskb)
> 
> If you do these, they should be separate patches.
> 

Cool! Once I do the above I will fix this in a separate patch.

Thanks again for your time reviewing Joe,
Luis
--
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