[PATCH 2/3] dgnc: remove DGNC_VERIFY_BOARD macro

2015-03-10 Thread Giedrius Statkevičius
In sysfs methods struct device is guaranteed to not be NULL thus bd will not be NULL in any way. Also, checking for bd->magic != DGNC_BOARD_MAGIC and bd->state != BOARD_READY is redundant because we already don't initialize broken boards since "dgnc: Don't save boards in memory that have failed to

Re: [PATCH 2/3] dgnc: remove DGNC_VERIFY_BOARD macro

2015-03-11 Thread Dan Carpenter
On Tue, Mar 10, 2015 at 09:29:19PM +0200, Giedrius Statkevičius wrote: > static ssize_t dgnc_vpd_show(struct device *p, struct device_attribute > *attr, char *buf) > { > - struct dgnc_board *bd; > - int count = 0; > - int i = 0; > - > - DGNC_VERIFY_BOARD(p, bd); > + int count

Re: [PATCH 2/3] dgnc: remove DGNC_VERIFY_BOARD macro

2015-03-12 Thread Greg KH
On Tue, Mar 10, 2015 at 09:29:19PM +0200, Giedrius Statkevičius wrote: > In sysfs methods struct device is guaranteed to not be NULL thus bd will > not be NULL in any way. Also, checking for bd->magic != DGNC_BOARD_MAGIC > and bd->state != BOARD_READY is redundant because we already don't > initial