Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4966486pxj; Wed, 9 Jun 2021 06:20:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxY1G1HESNd9L6vZ8yfXYzk+XlhhS1RCRFbzdGnmJZS64tsGHkZaG0Tq4o94BnyhnMwuQPG X-Received: by 2002:aa7:dc12:: with SMTP id b18mr30387290edu.52.1623244858316; Wed, 09 Jun 2021 06:20:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623244858; cv=none; d=google.com; s=arc-20160816; b=aSb/I5FTy/2E3vWbeEc6oEaunV0JT283iy+qiYo5BeL2rPvHUw00VOEI6Ma5O/B1J1 PcEIhCHo2kjXcMsEiXl2MpJcRgNHP9J4SeUHIRr1MrxaOQDhkKFCBBiwdoMHO/9XgOku lSo3LSWFZDI03LaDVRBqvK7i8EyKQkRKBM0o1P3ftMSF8F3DGurbYLB8NzGGoVFfdgYb qpMSZN+o46VJntZbT1IZx5ZdPRZksfFTeJ2uK01Ah3B8cFrheV066sNHwv2n6DAe1KaO bprNSn7C3Vw6DU4hFBUs2bhXGHA5xm1ENp335qC2C5KJIlfmT9KQktiasxyl+uBQMH4p FhNg== 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=hpnTnInlVMtv9lfb54LonTg7qGjKde/CO3J4I0t2FLs=; b=C1nMieafp3PhLkL4p/3Dxfo+hQYwjlRfzBoNAlW/0+2SaRanLBnV91wzmF9fbGC1kl CYVehwOlXlhp/EnFmujYNMCy0nnIqJ7UM2+xL6mw56p5Om1H6C/u1rlwUzdu7UMaHCfB Kfz+hdd38bP8qiuBvCxNfblfDZ6jz6/X0ZlAlTJxXwRtK2go4uVe7cMAO51b6t828ZeC VjqOLSOm5LdDfkF5We+TPWsRI/RyU5tcsRhiAdSGRoDYAdS/HN+m+FMpGqu8HKJd9A+K QVQ8yGFHObrqEVGpedWXiNQAv3aMgb/21/C+cB7SdRYeB2YBE/j6SmgFIO0Up1btHJ2E bEvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=aZ9V8AKA; 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 f22si2289320ejq.458.2021.06.09.06.20.33; Wed, 09 Jun 2021 06:20:58 -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=aZ9V8AKA; 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 S230027AbhFIG4L (ORCPT + 99 others); Wed, 9 Jun 2021 02:56:11 -0400 Received: from mail-wm1-f52.google.com ([209.85.128.52]:44720 "EHLO mail-wm1-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229676AbhFIG4K (ORCPT ); Wed, 9 Jun 2021 02:56:10 -0400 Received: by mail-wm1-f52.google.com with SMTP id m41-20020a05600c3b29b02901b9e5d74f02so308575wms.3 for ; Tue, 08 Jun 2021 23:54:06 -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=hpnTnInlVMtv9lfb54LonTg7qGjKde/CO3J4I0t2FLs=; b=aZ9V8AKAW8djNScDa76MyNBfnqPy3Y/TdyYAV0H1uVScbbhjqijtfxnDR5gxAFk5FZ G9xkjmuz//BeMhlvFW+jwNds9Kwabmr11jXDQI3QP1aLahNKn2D7xEIMNRXrnsn9MViF ldJ1cANjIlVU49//8S1OjS6EtNcBgU4Az0plb0gR+160rE6p4ev7qrnROZstRtBjqlg1 ca3b5aOd8RIOcM6CsRw/TUr8YLsTfqsTwWSnD/sDOWYOwecqxRm5FXs6VaAy9p12/TM7 o5irV5f1w80AYkuaTKRShGgr42wj9dytW2Q7Fe6H+68COa2vTu7hmeQN8bfZD977GiWi 4kWg== 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=hpnTnInlVMtv9lfb54LonTg7qGjKde/CO3J4I0t2FLs=; b=YiObc+WmV2c5/+3H3EDrNCDkDGnmZqrD/70DmP2sG1iks5VDIVXCOb75AbU1hgkjkG Nq2GEQNYg8HXeo4GXtdH3WZpofzFUh2pM9bfr65sx27IID6C8QD6jtG9Jsb6b4IQXxVn ayZkyu7mlgDQfYny8HCIpWvXixWXlVaW0/ovLCglnWuRdjEWCD1tectzAQIiaq0UDtV4 euPWHfG6E0bJJ3/ZMV+Jv2+wUVsW9H6c006ThaTyUnudDpJDqL/KJk8tk0S5XUGCK3YP RtXoNg9JgpvmWvjDLsz3Rtrx3nD/aSClqwLPAzqeQxpBByRqcZhUwcNvR7KdqSpP3GCu y1ZQ== X-Gm-Message-State: AOAM532jmrM+nl4ENcRMNhf9uu+lMBV7v5F+Pk4gVjZycs9ZWYBmxz5T idN93xj7N+r7K27yp6fbj3s= X-Received: by 2002:a05:600c:3b10:: with SMTP id m16mr7983686wms.55.1623221585760; Tue, 08 Jun 2021 23:53:05 -0700 (PDT) Received: from agape.jhs ([5.171.72.116]) by smtp.gmail.com with ESMTPSA id 89sm23954873wri.94.2021.06.08.23.53.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Jun 2021 23:53:05 -0700 (PDT) Date: Wed, 9 Jun 2021 08:53:03 +0200 From: Fabio Aiuto To: Liu Shixin Cc: Joe Perches , Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next 2/2] staging: r8188eu: use eth_broadcast_addr() to assign broadcast address Message-ID: <20210609065302.GA1500@agape.jhs> References: <20210608141620.525521-1-liushixin2@huawei.com> <4773dedc-dd39-ce1c-f7a6-58a93799fd92@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4773dedc-dd39-ce1c-f7a6-58a93799fd92@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Liu, On Wed, Jun 09, 2021 at 11:01:18AM +0800, Liu Shixin wrote: > On 2021/6/9 1:34, Joe Perches wrote: > > On Tue, 2021-06-08 at 19:01 +0200, Greg Kroah-Hartman wrote: > >> On Tue, Jun 08, 2021 at 09:45:49AM -0700, Joe Perches wrote: > >>> On Tue, 2021-06-08 at 16:12 +0200, Greg Kroah-Hartman wrote: > >>>> On Tue, Jun 08, 2021 at 10:16:20PM +0800, Liu Shixin wrote: > >>>>> Use eth_broadcast_addr() to assign broadcast address. > >>>> That says what you do, but not _why_ you are doing this? > >>>> > >>>> Why make this change? What benifit does it provide? > >>> The commit message is clear and concise as using available kernel > >>> mechanisms is better than homegrown or duplicative ones. > >>> > >>> Are you asking merely becuse Liu Shixin hasn't had many staging > >>> commits? > >> I'm asking because this changelog text does not explain why this is > >> needed at all and needs to be changed to do so. > > IYO. > > > > IMO it's obvious and fine as is and you are asking for overly > > fine-grained analyses in commit messages. > > > > The subject is clear though the commit message is merely duplicative. > > > > It _could_ show the reduction in object size for some versions of gcc. > > > > $ size drivers/staging/rtl8188eu/core/rtw_mlme_ext.o* > > text data bss dec hex filename > > 53259 372 2430 56061 dafd drivers/staging/rtl8188eu/core/rtw_mlme_ext.o.gcc6.new > > 53355 372 2430 56157 db5d drivers/staging/rtl8188eu/core/rtw_mlme_ext.o.gcc6.old > > 54673 372 2430 57475 e083 drivers/staging/rtl8188eu/core/rtw_mlme_ext.o.gcc10.new > > 54673 372 2430 57475 e083 drivers/staging/rtl8188eu/core/rtw_mlme_ext.o.gcc10.old > > > > It _could_ describe how the kernel mechanisms depend on a minimum > > alignment of __aligned(2) in the tested address and also show that > > the address is properly minimum aligned. > > > > struct ieee80211_hdr { > > __le16 frame_control; > > __le16 duration_id; > > u8 addr1[ETH_ALEN]; > > u8 addr2[ETH_ALEN]; > > u8 addr3[ETH_ALEN]; > > __le16 seq_ctrl; > > u8 addr4[ETH_ALEN]; > > } __packed __aligned(2); > > [...] > > struct ieee80211_hdr *pwlanhdr; > > [...] > > - ether_addr_copy(pwlanhdr->addr1, bc_addr); > > + eth_broadcast_addr(pwlanhdr->addr1); > > > > It _could_ show that the commit has some effect on runtime. > > It _could_ show that it passes some (unavailable) regression test. > > > > IMO: None of those are really necessary here. > > > > > > . > > > The variable bc_addr is repeated many times in the code and looks like magic number. I want to simplify the code by remoing unnecessary bc_addr. > And I think it's better using eth_broadcast_addr() directly rather than using ether_addr_copy() + bc_addr. > > Thanks to Joe for the data. > > Thanks, > > > I would change the subject line using the proper driver name: 'staging: rtl8188eu: ...' and not the compiled module name that I think it needs to be fixed (r8188eu). Thank you, fabio