From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751432AbdBSS64 (ORCPT ); Sun, 19 Feb 2017 13:58:56 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:29757 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750860AbdBSS6y (ORCPT ); Sun, 19 Feb 2017 13:58:54 -0500 X-IronPort-AV: E=Sophos;i="5.35,182,1484002800"; d="scan'208";a="213983843" Date: Sun, 19 Feb 2017 19:58:02 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Joe Perches cc: Arushi Singhal , gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, outreachy-kernel@googlegroups.com Subject: Re: [Outreachy kernel] Re: [PATCH 1/2] staging: ks7010: Unnecessary parentheses are removed. In-Reply-To: <1487529117.2198.36.camel@perches.com> Message-ID: References: <20170219182607.GA17005@arushi-HP-Pavilion-Notebook> <1487529117.2198.36.camel@perches.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 19 Feb 2017, Joe Perches wrote: > On Sun, 2017-02-19 at 23:56 +0530, Arushi Singhal wrote: > > Unnecessary parentheses should be avoided as reported by checkpatch.pl. > > Remove unnecessary parentheses, as reported by checkpatch as are nicer > > to read.For example:- > > It's often nicer to read if &(foo[0]) is converted to foo like: > > memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); > > memcpy(ap->bssid, ap_info->bssid, ETH_ALEN); > [] > > diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c > [] > > @@ -212,7 +212,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, > > memset(ap, 0, sizeof(struct local_ap_t)); > > > > /* bssid */ > > - memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); > > + memcpy(&ap->bssid[0], &ap_info->bssid[0], ETH_ALEN); > > This code doesn't match the suggested style of > your commit message. Is what is suggested in the commit message correct? That is, is the 0th element of an array always at the same address as a pointer to the array itself? Probably just paramoid... julia > > -- > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com. > To post to this group, send email to outreachy-kernel@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1487529117.2198.36.camel%40perches.com. > For more options, visit https://groups.google.com/d/optout. >