Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2073219pxb; Thu, 11 Feb 2021 03:46:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJy0Txvijdhn+w6JQnZ1Nxc9QW+Ej+S6qxTHAtUCJO54+M6HjkJceCmt8Ju/kTkHYFC9lj28 X-Received: by 2002:a05:6402:6c7:: with SMTP id n7mr8072786edy.289.1613043970961; Thu, 11 Feb 2021 03:46:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613043970; cv=none; d=google.com; s=arc-20160816; b=S+TPWlTEsVTZLkESx7+ZblJgV9J1ppboN/nbtFgyJbYECPlrHmT2cJjaHPuUopo0uf PEutduLEsNBPccZzd3c5HbrHgyyiPPikHP+2yMrXnu6Z9TDIzeA05QSrtaxaEHDKBQgm uBY4+plnnLBO7wfhVwHmDt6d0p4ecnQdHxC3qLRrydQw4xtwbZHHFKVNRy9KkKBIRKVq vE+HMVenlTf4SMjx0d+orM/meTV1X69V83kwGZ16drAMVyciycQhO8gnWdRY/pKnWKS6 XF8Nn5O/Uat27IOXLoUAEvbnsXwYWNtYVVtVgidD2Lmr3yCLdVikd2QDeOuerhaVB2Tw T35g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=pJp+qQkMBYEPi9LsGRiGcbpwDGwmtxOiwxR0JThExoc=; b=qOCwQOjw0Y3cRY4gJfwH3nDTbO9aL/FllUNWD++we5pJCNG9zzd1jbQeJwLA8ObP8m lA98J3tr+GIL/OnPU9p1mFy07HRnvyaS9WB10tm5mgW8Za6iBooJU3C4ssu5al1Mo4Z0 uUjYuDliGR46fUwkjkhM1kQQtdbxg09XZ6Z8wCWQ+0d8EQXH0k4qGrdNOlCbK8Ohl+bU 89PUyC7DRiUcwWLiR0hs4RW4/dtoPX5w+/RSNSTcQY14jF1pJabkf7MClDn5tziLj1ln iJsyizcHNq9Cw3kXVVGgY7aIBjvw8i/MmOvg8iWNp2H7fOFg8Z0X+bJS0e0BpCZnetbq xObw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=aNXOIUvO; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x2si3605984ejc.177.2021.02.11.03.45.46; Thu, 11 Feb 2021 03:46:10 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=aNXOIUvO; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230526AbhBKLmd (ORCPT + 99 others); Thu, 11 Feb 2021 06:42:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:38854 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230380AbhBKLLb (ORCPT ); Thu, 11 Feb 2021 06:11:31 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 332C964DCF; Thu, 11 Feb 2021 11:10:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1613041849; bh=OwTvJKo3bWcGvzUymqiegcRj1ye0KUJE2umtbnsBJ5U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aNXOIUvO8KBBEQKTqAlcFhTmgkYC/twHPKgXGJThqiJdXEC2pU43ZI2rgtjErhsU9 mdyCWivcrMHHlhE971JGp5LQj/9MDrY+pY942ceWNsPKn0IDXj8UZoC04QAjQoi+WI i9djr/n4a9oYQzqmwHVc9OXpH67StE3GtYwg4nvc= Date: Thu, 11 Feb 2021 12:10:44 +0100 From: Greg KH To: Fatih YILDIRIM Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, gustavo@embeddedor.com Subject: Re: [PATCH -next] staging: ks7010: Macros with complex values Message-ID: References: <20210211092239.10291-1-yildirim.fatih@gmail.com> <20210211105704.GA10351@TRWS9215.usr.ingenico.loc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210211105704.GA10351@TRWS9215.usr.ingenico.loc> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 11, 2021 at 01:57:04PM +0300, Fatih YILDIRIM wrote: > On Thu, Feb 11, 2021 at 11:02:51AM +0100, Greg KH wrote: > > On Thu, Feb 11, 2021 at 12:22:39PM +0300, Fatih Yildirim wrote: > > > Fix for checkpatch.pl warning: > > > Macros with complex values should be enclosed in parentheses. > > > > > > Signed-off-by: Fatih Yildirim > > > --- > > > drivers/staging/ks7010/ks_hostif.h | 24 ++++++++++++------------ > > > 1 file changed, 12 insertions(+), 12 deletions(-) > > > > > > diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h > > > index 39138191a556..c62a494ed6bb 100644 > > > --- a/drivers/staging/ks7010/ks_hostif.h > > > +++ b/drivers/staging/ks7010/ks_hostif.h > > > @@ -498,20 +498,20 @@ struct hostif_mic_failure_request { > > > #define TX_RATE_FIXED 5 > > > > > > /* 11b rate */ > > > -#define TX_RATE_1M (u8)(10 / 5) /* 11b 11g basic rate */ > > > -#define TX_RATE_2M (u8)(20 / 5) /* 11b 11g basic rate */ > > > -#define TX_RATE_5M (u8)(55 / 5) /* 11g basic rate */ > > > -#define TX_RATE_11M (u8)(110 / 5) /* 11g basic rate */ > > > +#define TX_RATE_1M ((u8)(10 / 5)) /* 11b 11g basic rate */ > > > +#define TX_RATE_2M ((u8)(20 / 5)) /* 11b 11g basic rate */ > > > +#define TX_RATE_5M ((u8)(55 / 5)) /* 11g basic rate */ > > > +#define TX_RATE_11M ((u8)(110 / 5)) /* 11g basic rate */ > > > > But these are not "complex macros" that need an extra () added to them, > > right? > > > > Checkpatch is a hint, it's not a code parser and can not always know > > what is happening. With your knowledge of C, does this look like > > something that needs to be "fixed"? > > > > thanks, > > > > greg k-h > > Hi Greg, > > Thanks for your reply. > Actually, I'm following the Eudyptula Challenge and I'm at task 10. First rule of that challenge is that you are not allowed to talk about it in public :) That being said, you didn't answer any of my questions above :( greg k-h