On Sat, Mar 01, 2014 at 05:11:57AM -0500, Mark Hounschell wrote: > On 02/28/2014 05:36 PM, Dan Carpenter wrote: > >Please redo this one. > > > >On Fri, Feb 28, 2014 at 03:49:09PM -0500, Mark Hounschell wrote: > >>This patch fixes various small checkpatch errors > >>I missed in patches 01-10. > >> > >>Signed-off-by: Mark Hounschell <markh@xxxxxxxxxx> > >>Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> > >>--- > >> drivers/staging/dgap/dgap.c | 16 ++++++---------- > >> 1 file changed, 6 insertions(+), 10 deletions(-) > >> > >>diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c > >>index 533a9e4..e1dc894 100644 > >>--- a/drivers/staging/dgap/dgap.c > >>+++ b/drivers/staging/dgap/dgap.c > >>@@ -260,7 +260,7 @@ static uint dgap_driver_start = FALSE; > >> static struct class *dgap_class; > >> > >> static struct board_t *dgap_BoardsByMajor[256]; > >>-static uchar *dgap_TmpWriteBuf = NULL; > >>+static uchar *dgap_TmpWriteBuf; > >> DECLARE_MUTEX(dgap_TmpWriteSem); > >> static uint dgap_count = 500; > >> > >>@@ -733,12 +733,8 @@ static void dgap_cleanup_board(struct board_t *brd) > >> } > >> > >> /* Free all allocated channels structs */ > >>- for (i = 0; i < MAXPORTS ; i++) { > >>- if (brd->channels[i]) { > >>- kfree(brd->channels[i]); > >>- brd->channels[i] = NULL; > >>- } > >>- } > >>+ for (i = 0; i < MAXPORTS ; i++) > >>+ kfree(brd->channels[i]); > > > >Does checkpatch complain about this, really? This is a code change and > >needs to be explained in the commit message at least. > > > > Yes. It complained: > WARNING: kfree(NULL) is safe this check is probably not required > #745: FILE: drivers/staging/dgap/dgap.c:745: > + if (brd->channels[i]) { > + kfree(brd->channels[i]); > > I saw no reason to leave the brd->channels[i] = NULL; there. > Fine fine. But mention those things in the commit message. So many people just randomly change things without noticing. regards, dan carpenter _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel