Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1340398pxy; Thu, 29 Apr 2021 05:11:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOWouBKAo/PxmhOSg2K5woT5bHcrSiIYFRaGqw4zHPrKM0ow4yn6087+TJCnd/vOlATXkr X-Received: by 2002:a05:6402:cb3:: with SMTP id cn19mr17644545edb.206.1619698283300; Thu, 29 Apr 2021 05:11:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619698283; cv=none; d=google.com; s=arc-20160816; b=fETHgg2jAorK4CChWkYvEg5WQU4v8gcUhIA5N7u4368vf9EAolv/Mvy6fbL28KSedQ T2UfsQuh68w72DnZMER+UgCI+85OuUy9FoPMOqkonODJwErDVNnXvE83R5sOLk9c3e+f 37rTS7dWA0MUmmWbK8mWMr2FKGUoxOEsg07vDm0bV5SZDREMvcrUOmP3tLFPGtxarTgH qfDtecsM8SIxQVEpcS4BNSZesoDhzJOoGiW/LhI9HK2Svq1Pezh0wfxONYKLYSkqUnlW gRn/q1owNLq1QrYK1GNAVEFEsMxQJWR0h0W5yEivCXiSrGISDuc8bHZg/MaEdRjnTjnD jEKQ== 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=E/qBmN3w5ra6vzERr1tAnJ+lRCifYP6wOJclMHfbmgA=; b=PIxa7GSu3AXQnQbc8a4JpVI5Tm3vhyXJ1ntmvtV3fEMCy4eRRVOZWs1B4d9fYx1taj Z+LUZHJ2CuSUWpKWiAeWPtqLyH3hGC4s5GXJsjNynzN90XaaxE1+0QLHlrT4WjZ6sr2w VjpE/1M6/860fbg9gzFWLOeEHzLlhZmPOkXP+lDG/wKZtKSTNON8UPqhEObPWgliJMCg yOMDoBLVGQmzza4S/EWZdEYNw8AeOU4lYdHoMf+nK5TdW48qlgpdB9/qN9CLZ4Z1zxIt fLu/Ll5IJ8W6tF/d2L/QSo83GXZJnQLasALNQgrutiJ+y4kLpMEOua66EKYKpyEK6ncn K6zA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lga51PiH; 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 b13si3026052ede.162.2021.04.29.05.10.58; Thu, 29 Apr 2021 05:11:23 -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=lga51PiH; 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 S235680AbhD2MIY (ORCPT + 99 others); Thu, 29 Apr 2021 08:08:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233337AbhD2MIW (ORCPT ); Thu, 29 Apr 2021 08:08:22 -0400 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8123DC06138D for ; Thu, 29 Apr 2021 05:07:34 -0700 (PDT) Received: by mail-ed1-x532.google.com with SMTP id q6so18970385edr.3 for ; Thu, 29 Apr 2021 05:07:34 -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=E/qBmN3w5ra6vzERr1tAnJ+lRCifYP6wOJclMHfbmgA=; b=lga51PiHQT8AXJaHF9E+Rcm2L7rBLdrZM+LDIobxpUfFnTW7kT866PFjvaeamdIvSy oBD2mFz5kUbvDDg4P1Cg8yPYTBWvdZXO8RsJJc4oXIOxDg45gU7vEzM++OrTbHtzNBQe rC2SSb7iC4kcW17d3a11uA/rozz2QvFI0F4cEh0FnZAyP5OZleb0yDhj4BCF+ftMk3Z2 byiuS7kh6koeNRV86e+Fxnw26SAom3jTRnzAe7a1jiU//Uxf7d/j2wCkKENOuPXiF9NE sQo2naXTvrxYe3K2YjKBJZmVXEjw0DZOLtjyFBFtm43mMQaypu7hcZmaQQTtedC9OPKp 4onw== 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=E/qBmN3w5ra6vzERr1tAnJ+lRCifYP6wOJclMHfbmgA=; b=eCntQ8uGcwHTUXXkg7gDMSpBXK08o6uk1T2Q1O268A/pKpNKb1RsQUkyqGjfQ0U2jR EgrUZ+Gh5KWeQBpFGjsDFrherPNFGk3+ufakPS7HA8we3l7JIUbtr4i3xF4Hx7qITBBh ODUPTlhvDEvlE3cTniwyOLDL04JwoggkP4z1LGWLSW2wz5EKKKd0rWP3SBnKOmqL7pva nsxhI5TbX3P+hIJW5cp8uMKA/hdADnfCZVMM5UnqLKmoHYY/nmoC92448MIVGCOXZfNc 1bFLHJDKvbiKzDUMqUj1IDAEiOw3GWXkrmthrNL/i4qW7cInW2IOGiRhdIxH9jR8o+vb LI+A== X-Gm-Message-State: AOAM530vFtItzOzSpj09mVxW7F46OT6cpuSA+o6ZWWVh+s1QzdvLZH2u SgYW9y73RqTbAS+28Gl0DOo= X-Received: by 2002:a05:6402:78b:: with SMTP id d11mr10066481edy.257.1619698053629; Thu, 29 Apr 2021 05:07:33 -0700 (PDT) Received: from agape.jhs ([5.171.72.170]) by smtp.gmail.com with ESMTPSA id c25sm2184909edt.43.2021.04.29.05.07.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Apr 2021 05:07:33 -0700 (PDT) Date: Thu, 29 Apr 2021 14:07:30 +0200 From: Fabio Aiuto To: "Fabio M. De Francesco" Cc: Greg Kroah-Hartman , outreachy-kernel@googlegroups.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [Outreachy kernel] [PATCH 1/2] staging: rtl8723bs: hal: Remove set but unused variables Message-ID: <20210429120729.GA1393@agape.jhs> References: <20210428113346.28305-1-fmdefrancesco@gmail.com> <20210429102201.GF1409@agape.jhs> <1870536.WTzYeaBcXf@linux.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1870536.WTzYeaBcXf@linux.local> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > Yes, but many types of hardware _REQUIRE_ reads to do something. So > > > "read that does nothing" is a requirement for some operations. > > > > > > As an example, a write is only guaranteed to have been finished if you > > > do a read of the same location back from it on some hardware busses. > > > The bus can reorder things, but a write/read of the same location can > > > not be reordered. > > > > > > Sometimes you have to do reads multiple times to get things to "stick". > > > > > > Other times reading from a location changes a state in the hardware > > > (horrid but HW designers aren't the brightest at times...) > > > > > > So you can NOT just remove reads without knowing that the hardware does > > > not require this. This is an issue where GCC "warnings" mean nothing as > > > gcc does not actually know what hardware does, or does not, do for many > > > things. > > > > > > thanks, > > > > > > greg k-h > > > > thank you for explanation, my hardware knowledge is poor:( > > Sorry for noise. > > > > fabio > > > I suspected that removing those variables could have been a source of troubles > (but I was thinking of possible side effects on internal kernel's data, not of > hardware related idiosyncrasies), however I think that you did well to point > it out because: > > 1) We learned something new from Greg; yes that's been very good for me > 2) I learned that, for the purpose of finding definitions, vim's ctrl-] is not > the right way to work out the problem. 3) I learned that with ctrl-] in vim one could (in some misterious conditions) see a function definition :-D It seems that you know more than me about vim, I make intensive use of grep for finding function defs and usages in code. > > If you have time, I'd appreciate some comments on the topic of line (2). > > Thanks, > > Fabio > > > thank you, fabio