Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1278950iog; Tue, 14 Jun 2022 02:59:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyN16GyQ7wR2GSiijnOQmF6AUCgf8vEwgPtdCw9HqVeY+LjbcfVIWE3OAcLRTTysw1QPE1q X-Received: by 2002:a63:f453:0:b0:3fc:7939:9654 with SMTP id p19-20020a63f453000000b003fc79399654mr3845825pgk.341.1655200761114; Tue, 14 Jun 2022 02:59:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655200761; cv=none; d=google.com; s=arc-20160816; b=f0BWQVcSnrGOgFFe5rPN/p3wRU5/TceUCp0RqH+vB6M6HKMbPzJUxQSnlHdDfKyOvY P/9IKxTrkv0Nq0BPHSWO8yx2nj2QDj15FS1UM0A0WFQsUAVMyalRFRBPHFlOTm2FdD2g 4bONL27oiIs82LLsUPdlZSKtyWBsK40d8H4a0DgHlCvjiCyj+Cyok7hd5ZeXFwuJRvRp y6vHNUV+7sGChL3BAAsau75Km8Zzjp1uqKzyZ0uGZR+JLPoAbCyhzVZ6/pvW5KgSVq6Y MIRFrS2nBxmUE4ZvDHXNLVtsnKolB7qq69XQ+YhTR42dj69xYNlrJGg2tSKWiS8zOPiB 0ieQ== 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=sQtqSgqF28ou6N2je/GdU8QL1zr48UAbdOgLA6SL9C4=; b=o3OHS9nlEXQlIas/It91ywccLHkPgdEifrEsS/+Dry2U8HgCE2omTNM36G2ZH1DXV+ 5L4IpYbEd8/CNb7OPsW5ZKKMa3mwZU3YQKJlJyFg5sAzqISFVZTebWGMiRXX3RQ3ziEG e6UlNW5fJjD4jEkfUvI4JdbV5E4fjQ41N/hOBMErFC8h0AjSKqds4O7HFdrET7j9xM3x P5SWg+avzXHP9Sc3NrEyFFLX3wBvXY0RPBPLRtFoS9QdWgvM8Xl8N3zZFiKO7jU/hC8S zM6mzOHucudjuP1Id5EU8wdbU1/DwScECS1ZKsoLRxWwJcbFpvT9f3jHAc7ZVgkutcX1 mH8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pR1Pg2HJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 2-20020aa79142000000b0050567a6fe15si11162231pfi.365.2022.06.14.02.59.08; Tue, 14 Jun 2022 02:59:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pR1Pg2HJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S240363AbiFNJec (ORCPT + 99 others); Tue, 14 Jun 2022 05:34:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230333AbiFNJea (ORCPT ); Tue, 14 Jun 2022 05:34:30 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26109369D8 for ; Tue, 14 Jun 2022 02:34:30 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B7F4B616BE for ; Tue, 14 Jun 2022 09:34:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C2A60C3411E; Tue, 14 Jun 2022 09:34:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655199269; bh=IYgQG9blIoKzvbPB3jEd8z1QwKJ/w1HafluWp4ktkPM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pR1Pg2HJJP7c+DzXAzcoYxcbReVYpqU1F1ZeO3AOqMUsjPCJ6I7c3KAbriJi8obk/ 9egLJjb1otwqHAkrfFUWftpVbqduUNO7Q/30QLcyYo7SKxVItHT0A0Wae0gUogMFCD M0rMjEJGa0sB2ZeH9W7eOByEUiQBvlWU5MQtVOWM= Date: Tue, 14 Jun 2022 11:34:26 +0200 From: Greg KH To: Dan Carpenter Cc: Nam Cao , linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev, phil@philpotter.co.uk Subject: Re: [PATCH v2 1/2] staging: r8188eu: replace LE_BITS_TO_1BYTE with clearer codes Message-ID: References: <4cdacd703158029c0b0f706e3cf1eb8daf4121c0.1655019752.git.namcaov@gmail.com> <20220613143024.GE2146@kadam> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220613143024.GE2146@kadam> X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 13, 2022 at 05:30:24PM +0300, Dan Carpenter wrote: > On Sun, Jun 12, 2022 at 10:11:43AM +0200, Nam Cao wrote: > > The statement LE_BITS_TO_1BYTE(__paddr + n, 0, 8) is not obvious on > > what it is doing, while in truth it is simply reading one byte. > > Replace these with clearer codes. > > > > Signed-off-by: Nam Cao > > --- > > drivers/staging/r8188eu/include/Hal8188ERateAdaptive.h | 10 +++++----- > > 1 file changed, 5 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/staging/r8188eu/include/Hal8188ERateAdaptive.h b/drivers/staging/r8188eu/include/Hal8188ERateAdaptive.h > > index 20d73ca781e8..79e4210c6b65 100644 > > --- a/drivers/staging/r8188eu/include/Hal8188ERateAdaptive.h > > +++ b/drivers/staging/r8188eu/include/Hal8188ERateAdaptive.h > > @@ -26,15 +26,15 @@ > > #define GET_TX_REPORT_TYPE1_RERTY_0(__paddr) \ > > le16_get_bits(*(__le16 *)__paddr, GENMASK(15, 0)) > > #define GET_TX_REPORT_TYPE1_RERTY_1(__paddr) \ > > - LE_BITS_TO_1BYTE(__paddr + 2, 0, 8) > > + ((u8 *)__paddr)[2] > > Instead of doing this, I would prefer to just get rid of > GET_TX_REPORT_TYPE1_RERTY_[1234]. Yes, I agree, that's a mess and almost impossible to understand... thanks, greg k-h