Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1468817pxf; Fri, 26 Mar 2021 08:17:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMHEw0EhxANyPqZGx2zFug65Mjnar5t6v9eYdqrfirHHLkk9/7hirSAYDW9CowB9WZrtfB X-Received: by 2002:a17:906:74c4:: with SMTP id z4mr16024498ejl.512.1616771839862; Fri, 26 Mar 2021 08:17:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616771839; cv=none; d=google.com; s=arc-20160816; b=D78/KvOEqLM5736aJr/SJIMRDNI8zIoRbC2zDuWavNQxUtDTydAX+9IRIO8InfXWeY hRvHxx1+yNImDtb7jBYtebDXhGQi3ItwDzdJeah2OsLL7L+L5SAJyUT+Hp6ZMtRSbXL7 6vKNPaMDuP/0Fgh0cqxQ3rjtGOMZEyVMdCmlN6RPQEhZDZiyiT9S5o7/2ntYb1UoFmb1 FGQk7kW0Ep6ZMPt7V4Po/7Z0XY9zdDtThEREn4J5OXCw5ca1uIAzrVFk6V+pTzow3l8h txJhnEWK3kCcCBsQA6xXaUPL1hJKX7x12LVIncVGRms9bOttOUAmFUlk/t2uo2nc+XSw zOzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=vJD63yjhBQ/6qYwEetX6fhqse6jdADR22GvZycMU1kg=; b=PCcJeBdhegPHJFj1CS7ehNN+Nh1IUztGcgaVQZOT9WybYZR0jQvCEwG2UpFVd/id2I blFv4E10OFktgtsf8cBR41o8+5pUdXue5FGaPD6qWH7XOS9MSctEhQHekAt2Xphiotnu VWd6nL57MID7fVoLgDk61cftM++Z3NnjCqfNXNK40WuQsDuPtvookufsXaYWErm2Aeek S05OwL4wA5Fhjbq9kNG1U34zrldak+Ozwdkq9t3Iv4gpFz+7s0MZtaPc49rdyhHo9u95 YOpwvzUmeIHiX6XcQlVBRE+P1WjZtBsoqMZfvIW3pgHooGEPJQc0DpavTAW7Ulw1GaJL fKnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=h0hbKyyF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s24si7024322edy.266.2021.03.26.08.16.56; Fri, 26 Mar 2021 08:17:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=h0hbKyyF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230447AbhCZPNL (ORCPT + 99 others); Fri, 26 Mar 2021 11:13:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231316AbhCZPMt (ORCPT ); Fri, 26 Mar 2021 11:12:49 -0400 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 169DFC0613B3 for ; Fri, 26 Mar 2021 08:12:49 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id t5-20020a1c77050000b029010e62cea9deso3196463wmi.0 for ; Fri, 26 Mar 2021 08:12:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=vJD63yjhBQ/6qYwEetX6fhqse6jdADR22GvZycMU1kg=; b=h0hbKyyF+cz/P5CbiOOmWKzwR06PsSPq55Ngy4fgoALtC8yuEaEK9doN+YeSVlmXW7 B5lHRN88SDNUGzyEq5lgbxDHGRdQLgTnbIj1LAt3TbE/CvkUGy+ZvReX8GRwSLk+W3cU gNQ8Is9QE3RKW6y5gW6MURu0sX249kNivRQfFVyyfWgBZrtOIngY/ahyw3zYH23k6Za8 pRbAXDn7/nGJAO9/FGgLl0y7M3rF0pWi89oM5lf9hdTWX1qB0tuwK6fPXcVNooucHvlb ziw7h/BTS4zTad0L05dW3NDH3hnAUwCOjTKO17HS0RhIe09iUfYZdQHWLIJAuzdfKfVt O5hA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=vJD63yjhBQ/6qYwEetX6fhqse6jdADR22GvZycMU1kg=; b=YyD7Kufi18oEdwZFUnp7HmJ4vlWiwZs7hFTciL8Liz0J3IPf8WthP/dYlKxEt48xKm 9VTausOC4e9vW49QqADSNUcrJERyi0eSJbOH6iNBso3CsAKkyeO29cK8bjoFmAhunBuV bEoGpkrzGZ47PqhpuKNtS6IU36+8FZ/sMQNVMJf3svHJg1QhcgWD5ruKR45fS/+shA0a RKW9unM4avzjI/OlWlQ3h57QyLVjQ4RfK7rzFS/dkqtLN1OLRB4AGzn4LWwkzTAwIkzG KGEtm4tCCbU2N1tvyG9+klNrRG0rYVGjG06hhhtw3lA0ML7bzclknJmlv6YPBHxxJpQ6 fGkw== X-Gm-Message-State: AOAM5334XdX7B7yGZjH+0LV3o+SKVZy1t378jhM8INrSB+AD2SVoD11w MXHFNm0kn/h/bBr3pVY1GtQ= X-Received: by 2002:a05:600c:3796:: with SMTP id o22mr5872060wmr.139.1616771567854; Fri, 26 Mar 2021 08:12:47 -0700 (PDT) Received: from agape.jhs ([5.171.80.141]) by smtp.gmail.com with ESMTPSA id a67sm2558576wme.33.2021.03.26.08.12.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Mar 2021 08:12:47 -0700 (PDT) Date: Fri, 26 Mar 2021 16:12:45 +0100 From: Fabio Aiuto To: Dan Carpenter Cc: gregkh@linuxfoundation.org, david.laight@aculab.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH 05/15] staging: rtl8723bs: put parentheses on macros with complex values in include/drv_types.h Message-ID: <20210326151244.GB1952@agape.jhs> References: <20210326142257.GF1717@kadam> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210326142257.GF1717@kadam> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 26, 2021 at 05:22:57PM +0300, Dan Carpenter wrote: > On Fri, Mar 26, 2021 at 10:09:12AM +0100, Fabio Aiuto wrote: > > fix the following checkpatch warning: > > > > ERROR: Macros with complex values should be enclosed in parentheses > > 279: FILE: drivers/staging/rtl8723bs/include/drv_types.h:279: > > +#define KEY_ARG(x) ((u8 *)(x))[0], ((u8 *)(x))[1], > > ((u8 *)(x))[2], ((u8 *)(x))[3], ((u8 *)(x))[4], ((u8 *)(x))[5], \ > > > > Signed-off-by: Fabio Aiuto > > --- > > drivers/staging/rtl8723bs/include/drv_types.h | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/staging/rtl8723bs/include/drv_types.h b/drivers/staging/rtl8723bs/include/drv_types.h > > index 1658450b386e..ead4cb9c1e5a 100644 > > --- a/drivers/staging/rtl8723bs/include/drv_types.h > > +++ b/drivers/staging/rtl8723bs/include/drv_types.h > > @@ -276,9 +276,9 @@ struct cam_entry_cache { > > }; > > > > #define KEY_FMT "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x" > > -#define KEY_ARG(x) ((u8 *)(x))[0], ((u8 *)(x))[1], ((u8 *)(x))[2], ((u8 *)(x))[3], ((u8 *)(x))[4], ((u8 *)(x))[5], \ > > +#define KEY_ARG(x) (((u8 *)(x))[0], ((u8 *)(x))[1], ((u8 *)(x))[2], ((u8 *)(x))[3], ((u8 *)(x))[4], ((u8 *)(x))[5], \ > > ((u8 *)(x))[6], ((u8 *)(x))[7], ((u8 *)(x))[8], ((u8 *)(x))[9], ((u8 *)(x))[10], ((u8 *)(x))[11], \ > > - ((u8 *)(x))[12], ((u8 *)(x))[13], ((u8 *)(x))[14], ((u8 *)(x))[15] > > + ((u8 *)(x))[12], ((u8 *)(x))[13], ((u8 *)(x))[14], ((u8 *)(x))[15]) > > KEY_ARG() isn't used anywhere that I can see. Just delete it. > > Please take your time when you re-write this series and think about each > change clearly and fix the underlying badness instead of just making > checkpatch happy. I would really just throw out the patchset and start > over from scratch. > > regards, > dan carpenter > Hi Dan, KEY_FMT is unused as well. I'm rewriting the whole series, will send v2. thank you, fabio