Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751366AbdFWL3X (ORCPT ); Fri, 23 Jun 2017 07:29:23 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:33405 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751169AbdFWL3V (ORCPT ); Fri, 23 Jun 2017 07:29:21 -0400 From: Jaya Durga To: gregkh@linuxfoundation.org Cc: Larry.Finger@lwfinger.net, florian.c.schilhabel@googlemail.com, robsonde@gmail.com, becher.jannik@gmail.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Jaya Durga Subject: [PATCH 3/3] Staging: rtl8712 : wifi.h: Fixed Macro argument reuse Date: Fri, 23 Jun 2017 16:54:40 +0530 Message-Id: <1498217080-18116-1-git-send-email-rjdurga@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 849 Lines: 28 CHECK: Macro argument reuse 'pframe' - possible side-effects? Convert get_tofr_ds macro to inline functions to fix checkpatch check Signed-off-by: Jaya Durga --- drivers/staging/rtl8712/wifi.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8712/wifi.h b/drivers/staging/rtl8712/wifi.h index 556367b..0ed2f44 100644 --- a/drivers/staging/rtl8712/wifi.h +++ b/drivers/staging/rtl8712/wifi.h @@ -170,8 +170,10 @@ enum WIFI_REG_DOMAIN { *(__le16 *)(pbuf) &= (~cpu_to_le16(_FROM_DS_)); \ }) -#define get_tofr_ds(pframe) ((GetToDs(pframe) << 1) | GetFrDs(pframe)) - +static inline unsigned char get_tofr_ds(unsigned char *pframe) +{ + return ((GetToDs(pframe) << 1) | GetFrDs(pframe)); +} #define SetMFrag(pbuf) ({ \ *(__le16 *)(pbuf) |= cpu_to_le16(_MORE_FRAG_); \ -- 1.9.1