Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp398638rdb; Thu, 22 Feb 2024 07:12:24 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW3/FvfECGxJVp5lzds5s65hR3txhtIG5X2rcX6t7DhbspvKvly47KR9iF61z69NzfjkN7phzhttXjq7tuho8j5p3P91nTzyAYVdnlaSA== X-Google-Smtp-Source: AGHT+IHGqq15IAZLiNuheIV47uvrM+vdAo824NyNLVZUMAk1Mnr8jrfBL3AJmTW0BCeO7LcY2qaO X-Received: by 2002:a17:902:d4ca:b0:1db:f23f:678e with SMTP id o10-20020a170902d4ca00b001dbf23f678emr12628049plg.15.1708614744082; Thu, 22 Feb 2024 07:12:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708614744; cv=pass; d=google.com; s=arc-20160816; b=fX/5JcS2m+c0vf8qlXWwLDRvJoAEHgw1SA/tbHu5M50jJjdv8o9u6p+L0pAnCTNqsX d7xIgZ9FmcQRxM4Z0KmN2+5TLFrb0RFR5w3MlJxM8fxyDp94QwQ8painz/rpU1WGNnGP 497zQ+9RrbxKXhjzg8C0JgTjg+Q6PMPfx+bL3afn2FEcLOvD7LLgsBgTPAQVG3a3B9bJ CAlCIAjs+jvExJ+NGj5oacUHKylSPLlAHLGyaMPbnu3oMLuSCpeKyTs/pJVTCFVYrQKx GpWwrAd/tKl88EeFWg7jDtt7sj8dobni7nKcYFUsf8jjZyKiputzViTAyM5bpyxs+yo3 DKuA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=wMH/YxCjPZ+y9HsN5oGyh1S5l+4RS/ggKj3jV/RYk0o=; fh=TCAt/R3HdXm5/548d62ObWzS/Jx3jcOKiUqrsB3bV+g=; b=jrCb3YXmundxIvEtArjQPj6Wi1yfC+xIc7lwBGQ4xHnFDUfvGigiGG/N2Z/XWXwHHe AdVild3jtIV0CMAVJZrg81a1fXesz3jhOk4XVvDZYUFztefMwfMsoMJjuvwxMxd6BpPO kBH7vXWvaGwQPb5GcoNfq1IzWmkonCQgczbZuX8FVCgwOn3+RPK2ZCDRWRTsw18XVsqD qEmmOK3RbPptA8Rx0SBCjucccW3ZPFU4lyy4KFTcxv/6jdW5ZHSDHgKPZyMQdOsSs4Bs W6A/mi900okzxozh3q80I/DJH4hxVAiouWwaeqhp1Le7HvGrIniMY5w+Zb/fe4Wcuha1 XqCA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=PlwPp4qs; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-76750-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76750-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id b15-20020a170902d50f00b001db7062086dsi10294825plg.484.2024.02.22.07.12.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 07:12:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76750-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=PlwPp4qs; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-76750-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76750-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 73C53B25434 for ; Thu, 22 Feb 2024 15:11:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 541C914AD2C; Thu, 22 Feb 2024 15:11:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="PlwPp4qs" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 64BDB149005; Thu, 22 Feb 2024 15:11:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708614668; cv=none; b=mkupuWPuek6P2Avw7SO5R6kSthRd0gtMTqOmIKEHWp2Fy10vX+sza+3vDeu2V4d9jwP8MRQByGDRMGLWPuAYTcGD300tkb733qPgojRDoeEm/8c+953Mw7tv/6Jz0/6ygT2eWsM37acToJLhSfvaCCOwQVzOFG6eW/B2INAy0so= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708614668; c=relaxed/simple; bh=N4DqxkrUO+39GL6l6n4cDeOPvtBE1QaBpCHDr4rRhKE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DWpXAAibRz2krhzyaE6XDhr1/lerxY8LGmAe7QoyuK9q2BSy2yrluh8JSkLBG3tSR26Wm3vLywu1NHyua3DkcrlFwQWG3tpHfHeI43lmLUX6x88rKyguu96D85RYA0jes5Hlv7bmgndueGe/el3Xe5Cntz3jLTI3UZTpPGWPcKE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=PlwPp4qs; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=wMH/YxCjPZ+y9HsN5oGyh1S5l+4RS/ggKj3jV/RYk0o=; b=PlwPp4qsKfFwbW6SZDrR5NPnMQ bR7XdWqPB+3yentT0+DlCP3iWQUbcAbX468on34w/o/3vMxOcbjXYYQWet4npgIE2qKzq8kE44oHM JT5IhGFCO0YIF5P7A3+uL6bdTE3C3jSwdtnPLreSxTDspO8QL54S9WVu7na1/VEbCscc=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rdAj7-008S6N-L3; Thu, 22 Feb 2024 16:11:09 +0100 Date: Thu, 22 Feb 2024 16:11:09 +0100 From: Andrew Lunn To: Simon Horman Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Ariel Elior , Manish Chopra , Jesse Brandeburg , Tony Nguyen , linux-usb@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, intel-wired-lan@lists.osuosl.org Subject: Re: [PATCH net-next v4 3/9] net: qlogic: qede: Use linkmode helpers for EEE Message-ID: <68088998-4486-4930-90a4-96a32f08c490@lunn.ch> References: <20240218-keee-u32-cleanup-v4-0-71f13b7c3e60@lunn.ch> <20240218-keee-u32-cleanup-v4-3-71f13b7c3e60@lunn.ch> <20240220124405.GB40273@kernel.org> <20240221102851.GA352018@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240221102851.GA352018@kernel.org> On Wed, Feb 21, 2024 at 10:28:51AM +0000, Simon Horman wrote: > On Tue, Feb 20, 2024 at 03:45:28PM +0100, Andrew Lunn wrote: > > > > + unsupp = linkmode_andnot(tmp, edata->advertised, supported); > > > > > > nit: Given the types involved, I might have written this as: > > > > > > unsupp = !!linkmode_andnot(tmp, edata->advertised, supported); > > > > linkmode_andnot() calls bitmap_andnot(): > > > > static inline bool bitmap_andnot(unsigned long *dst, const unsigned long *src1, > > const unsigned long *src2, unsigned int nbits) > > > > It already returns a bool, so there is no need to force an int to bool > > conversion using !!. > > Good point, sorry for missing that. > I assume there is a reason that the return type of > linkmode_andnot is not bool. Either i got it wrong when i added the wrapper, or bitmap_andnot() has changed since then? It probably can be changed to a bool. Andrew