From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f44.google.com (mail-ot1-f44.google.com [209.85.210.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 01A2B36897C for ; Mon, 13 Jul 2026 08:04:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783929895; cv=none; b=tPrO+xPnPTOrn/LDLpRcxd5G6jXtWGGHXHyPrEufbQtZzEuDRqpEhticzvAs+Nk0uzw90Dj2ajEc1RP0eb++Nhi3HFy7rPWRH8IezNU+9UETE7ckB0Ql74iV7qxHJcT8AZl9tTXnyRy+aZyajyIk15DnDofWKkKVCXjvcONJaNI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783929895; c=relaxed/simple; bh=DtmdeSEEkMd6hSliNTMBtdGoqWUa3F++SLfQRU48okI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=hCX7JfDw/9cUHCT+WoX9kgTOTG7Y/hewdaiy/iYWGE83auAO3jgQ0QHA8ph/74uttpZSH41pUxbbPSuk2wIwXojePrXD12hdtwlCqJvT1hF2cGGcY74WBfN0KBBb6aYNY13uW2NEUU8c2pnhNHhSD6me+LE8dJtTXAZSXf7uCWQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=rMYTKyWU; arc=none smtp.client-ip=209.85.210.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rMYTKyWU" Received: by mail-ot1-f44.google.com with SMTP id 46e09a7af769-7e9ef94c0e2so1306505a34.3 for ; Mon, 13 Jul 2026 01:04:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783929893; x=1784534693; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to:content-type; bh=CApcsfFtc+hrLmr0JOKsk6dM8KUEWmCDq5Qyf4FUjUA=; b=rMYTKyWUSLs/oUugE/Dpodlq1QenIFz5RyE5NObychObG/BfxL3G4LUm3wLSz+YjNg V9C+EBwF/3CTTJQUrGMouX2AwoUxY2h+hVfadPkpT8MjCVfP/Kz1kUoVCGutXPe5+dtA rnBWH7l41cD7ISEjFJKSWzQKiV67wdVeR+ncPoC6CAHJoxl8715mkM/LTUNYC4Hey4x/ sum5zB8n5GMPQ6xhdD8v6pd334+bO7+aS8dfXg1hv67m2Cw2jxoGdPrHIPjWiDB9+uIO 0KOwWITFz5hAXJvFFshxWANNJ93+bWhXPpmbF0mmCSqSd81KWMKjFfOaVOVFfrWwPcKM oJhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783929893; x=1784534693; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=CApcsfFtc+hrLmr0JOKsk6dM8KUEWmCDq5Qyf4FUjUA=; b=sb8MVDNrmIuJLzJCT91Teu0B9tPP3H1sxWfDS1tt0GHULh4U7gn9Rjy26UAAbNMHws RMYyN61XeJz092P8Jd3eGZK3LmG3h4VSOkfAZ4ywSzIJ3qbJ7INMBPP5IEAbalBwdD+L VGkpbyxr7RdZg4wCfzOYmR+0n+uNTU4Djmx9TZGShenRvaEHGwQdBhGWbznxs85dLRSC TiaSc3ehS5l++PqNPsuqy3UdSpZN056O1AOeESShqovBp4cF2padI6zY5SdwFdSOiPAK eqPuykm3bPcfZgZZcYcxJ+n6Lun+2Rk5diZB/SCohJ361Seya6kfaawyTiod6nZq2/I9 ytig== X-Forwarded-Encrypted: i=1; AFNElJ/L1p/iKAPnH+RgYhQCKizw4LOJ/PhP5eZ0nkbF86zlr/glVtK12m3tD0TGR7rjeXnbhp5DlwvRE5AOzPU=@vger.kernel.org X-Gm-Message-State: AOJu0Yx1WF9f42+FxX35t0kVECH/dyRpzNlen/i3jZjH91JQbtsiiU9e q8Meq3xXMWfc9Dri/wGflXeftQIOk8vSLluKNCGxwsz4/ofCgPc7xAP2 X-Gm-Gg: AfdE7clQmcRlX+LjgN6Vm0JY72MIxVqSXyWyFoHhWoLzxhiDCkxtHy4xQV/NBokPwL/ sGdk6eOsKGQhlLi2MRgWON9gH0FbmhDq89XqT7JDutbq2iEdCrhGsV4J3ICWAuB84EstZzaMdAU wal8RwQpUssGjqNFESIpvHsl95Gc3KeJx32lPMPx6GC2EH1TZLeNipUOI2pzSy+k0B5JNQCwftj 2oFknUvxvmumYKnODLMzjySFVjIw5LCKiguVl6HZORoFnD38ye4rBvpvb1Aimihre0EXqGTzYYa j98GIXbQTUjsVr/3pozSdGdOa3hUWJuOKFl6akwwcUj4kaO9pTEIh+jeQ/5+ubxpNWp5UziSCKd s9snRLQGZBX3zilQuLAlZZ9iX9CK3wuztwhPSSM8JBelNSqbOCnylWrNasb980MuXBXDpujboXo 90iibu X-Received: by 2002:a05:6830:6688:b0:7e6:de36:3f35 with SMTP id 46e09a7af769-7ec0966e43amr5571430a34.10.1783929892978; Mon, 13 Jul 2026 01:04:52 -0700 (PDT) Received: from localhost ([74.80.182.78]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7ebcb2631dfsm12412729a34.13.2026.07.13.01.04.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 01:04:51 -0700 (PDT) Date: Mon, 13 Jul 2026 11:04:46 +0300 From: Dan Carpenter To: Markus Elfring Cc: netdev@vger.kernel.org, Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , MD Danish Anwar , Michael Grzeschik , Paolo Abeni , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Vadim Fedorenko , Yibo Dong , LKML , kernel-janitors@vger.kernel.org Subject: Re: [PATCH net] net: rnpgbe: Pass an expression directly in rnpgbe_rm_adapter() Message-ID: References: <7958e26e-a4f9-48ee-8d79-3797016944c5@web.de> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7958e26e-a4f9-48ee-8d79-3797016944c5@web.de> On Sun, Jul 12, 2026 at 08:35:21PM +0200, Markus Elfring wrote: > From: Markus Elfring > Date: Sun, 12 Jul 2026 20:25:10 +0200 > > The address of a data structure member was determined before > a corresponding null pointer check in the implementation of > the function “rnpgbe_rm_adapter”. > > Thus avoid the risk for undefined behaviour by omitting the variable “hw”. > Pass the required address directly to a function call. > > This issue was detected by using the Coccinelle software. > > Fixes: 2ee95ec17e97c58b65e978a08b75fa8cb6424e4e ("net: rnpgbe: Add register_netdev") There is no NULL dereference here. It's just pointer math. No need for a Fixes tag. regards, dan carpenter