Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2398238pxb; Tue, 13 Apr 2021 00:29:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuMgtzgkqntW/tp05n28WWTugxXKTRYu9hOqK2ar47+OtISlkaIT3UpcUA+M1D84F87vUq X-Received: by 2002:aa7:c957:: with SMTP id h23mr33028173edt.301.1618298957356; Tue, 13 Apr 2021 00:29:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618298957; cv=none; d=google.com; s=arc-20160816; b=rV4PbW7i9b26ZOMbEtXUPbt2JdsWaNwd31EpSIlgXKZ7Q6qxAsqPD+w7uiaj62cmZq m+co37LrYiFdqu1cuVhvazGQzEcYq79sLe9UDRlXQY6djzrZylfXGY3qnbeOo0mc3Qiu nI4c3EiymMIhh8P64QCupIpfUusTo2h67R8EAFuvOCUznOgNKkP4b0dd3xUdllyulnGR 2QBcR3ULRUfZqtEkovjAT74DCqQcQGfGYiSuZJUwuhZMo941bgcJK8txdlDdL0qmTptk FK4n10woLn7DezZmKTuVnGAeGFvw0y1jFZ36LHc8EMlay5SWV9mKU8wFcS2ca1aeEAHz JCkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=38EFXkI8DWit9CwS5x40WemK77vWtcWY+hYijRyV7pM=; b=Nmo/mCbE+nghltbjzySo540+f/rHEQLMMtAdZmMcEMc+q3ejZxYwRoxr1F/0Pw7GLG aHzO0s5StwK+rjF67h/pZhx8ci3Wl1CEE5ujzmnn/Fl0rCBKZvn1fIX5gGwjxXwvXAah kEpHDdWoirg8GkaEGI5qw75bCn+lhArOpl0n4Sk6iCiqpI8+zPk3or/JIX3kTl2+A78K 1I18+0ERNL7xwVkEuXRVFjKlTTFwc84Fd8YmUlgYmpQ3XrkOsRxwEFsn9/gciTGdy+0s aZa5qgpSLboyNIML1qNDimG5VrsUApWopWNcJtp/PcthAVbDncjRUxsWwpy2LQDFGHDp Y/TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=opILwwLP; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m20si4002440eja.616.2021.04.13.00.28.53; Tue, 13 Apr 2021 00:29:17 -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=@kernel.org header.s=k20201202 header.b=opILwwLP; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344098AbhDLXZa (ORCPT + 99 others); Mon, 12 Apr 2021 19:25:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:53964 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237594AbhDLXZa (ORCPT ); Mon, 12 Apr 2021 19:25:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B95356117A; Mon, 12 Apr 2021 23:25:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618269911; bh=8QG07yo2K7Dq82DhFt4x/CRGsKmIlCalkJF2oJJUeW4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=opILwwLPfSjyUTuhgnq28UTotplWWvY+ZR5GFhP52CXxJlC5bDiQbI0k8BQx3aoor LBdX30bf20/cCiAi7YseA8M/3rrX9ySt1zvgCy/1WxzCxsMJ52HQHpcOdm1TjGqdIY YvRepcJXl7gOopy/HfE0k3zYDOKFsFRm4YCH4TujGnwzay16dKTgwuEIRKFpg2Eyfj 7oSI9hFk8raOVtoYoX38WUbCFBPkgYLh2Cj3WSDJYBU1MkYqxT2BiomHYpdHJlIOTN pI2iInvJzsTvnAhDiVzn0BcELfLONas3zJtVDd+D/QxpCbjjh4DXHwgiYkQ3s+zf7s upQR6p1le99yg== Date: Tue, 13 Apr 2021 01:25:06 +0200 From: Marek =?UTF-8?B?QmVow7pu?= To: Pali =?UTF-8?B?Um9ow6Fy?= Cc: Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] net: phy: marvell: fix detection of PHY on Topaz switches Message-ID: <20210413012507.355bc809@thinkpad> In-Reply-To: <20210412165739.27277-1-pali@kernel.org> References: <20210412121430.20898-1-pali@kernel.org> <20210412165739.27277-1-pali@kernel.org> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > + /* Some internal PHYs don't have a model number. */ > + if (reg == MII_PHYSID2 && !(val & 0x3f0) && > + chip->info->family < ARRAY_SIZE(family_prod_id_table)) { > + prod_id = family_prod_id_table[chip->info->family]; > + if (prod_id) > + val |= prod_id >> 4; Isn't if(prod_id) check redundant here? If prod_id is 0, the |= statement won't do anything. Marek