From patchwork Thu Apr 4 19:29:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thorsten Blum X-Patchwork-Id: 1919937 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=toblux-com.20230601.gappssmtp.com header.i=@toblux-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=l9DyFMpu; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.org (client-ip=150.107.74.76; helo=gandalf.ozlabs.org; envelope-from=srs0=cdtg=lj=vger.kernel.org=sparclinux+bounces-861-patchwork-incoming=ozlabs.org@ozlabs.org; receiver=patchwork.ozlabs.org) Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V9WtY3R8wz1yYn for ; Fri, 5 Apr 2024 06:30:45 +1100 (AEDT) Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by gandalf.ozlabs.org (Postfix) with ESMTP id 4V9WtY0wsTz4wyh for ; Fri, 5 Apr 2024 06:30:45 +1100 (AEDT) Received: by gandalf.ozlabs.org (Postfix) id 4V9WtY0tG4z4wyj; Fri, 5 Apr 2024 06:30:45 +1100 (AEDT) Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: gandalf.ozlabs.org; dmarc=none (p=none dis=none) header.from=toblux.com Authentication-Results: gandalf.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=toblux-com.20230601.gappssmtp.com header.i=@toblux-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=l9DyFMpu; dkim-atps=neutral Authentication-Results: gandalf.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:40f1:3f00::1; helo=sy.mirrors.kernel.org; envelope-from=sparclinux+bounces-861-patchwork-incoming=ozlabs.org@vger.kernel.org; receiver=ozlabs.org) Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [IPv6:2604:1380:40f1:3f00::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by gandalf.ozlabs.org (Postfix) with ESMTPS id 4V9WtY0lDCz4wyh for ; Fri, 5 Apr 2024 06:30:45 +1100 (AEDT) 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 D3383B23DAA for ; Thu, 4 Apr 2024 19:30:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E4A66134725; Thu, 4 Apr 2024 19:30:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=toblux-com.20230601.gappssmtp.com header.i=@toblux-com.20230601.gappssmtp.com header.b="l9DyFMpu" X-Original-To: sparclinux@vger.kernel.org Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.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 06CC4133426 for ; Thu, 4 Apr 2024 19:30:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712259034; cv=none; b=QOaWpj/vhZENBKTWHKqHR38EItAzPXqPjAb2v4tspkM9ijpVA8jXxAXwXNTq05+2AeNR+eghgNiTs98O5cvgSDQ1u+yy22oFMlYHCE9178z2kHOtgLQ43OvxrLi9VuQ9Lyh6k6J2M6dgt8bo81TZN2/e/WZ4Vs5xAepsZLN7OsQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712259034; c=relaxed/simple; bh=dXY4VqV2dgu2W0tvqxrSc6CK/AEkg1qzMSsPoi4MjiQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=YO22bImibpJGjfWvwQlWQI8VnuBm+FAhVNmv3PM2iyGtxXJGsDulrAncw2yrEnBnVaddxDLC+KZuqxtc7U1dRlJZoV+cqydrYu2m1qsBieFzb3pvsoOPQHcfuVS9V5jSPkdwzGvjX5zClrQ0Ppg1QS7vqennjIDu1GucXeavpbQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=toblux.com; spf=none smtp.mailfrom=toblux.com; dkim=pass (2048-bit key) header.d=toblux-com.20230601.gappssmtp.com header.i=@toblux-com.20230601.gappssmtp.com header.b=l9DyFMpu; arc=none smtp.client-ip=209.85.218.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=toblux.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=toblux.com Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-a4e40fad4fdso195264866b.2 for ; Thu, 04 Apr 2024 12:30:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toblux-com.20230601.gappssmtp.com; s=20230601; t=1712259029; x=1712863829; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=YftQBH4K5k1eA4ljqzTyg0/24HcF6aTvgonFgjzZs9Q=; b=l9DyFMpuH5iZp8yRXD2IEjiJeCrlX2btyTYA5n84C+kCiWjreXcDNA/9kUdMZhBNSM 3C3pRkikqkoPJbzOxLv1vn3qfOUdAAIF+GOxRBJywD3+hBk+SgPlAeSR5zmsAmhvIQ6g Ibdo4r9at/r3P7RgU8rGqQ9qNWpW6urB/ah0umZ2PALWUinZC8ixt9v8NOeww9Eev1lQ /lDRHDMlVRUm06EAAQT94cm4tJ+mntCp8XdV67eM6Dz1UToS4sbgi3nGFOAHtZVlSJPw oTW5j4z52ZLsx9Hwqx+rQ7M/rxSwZ5WqwwcjmUlqXgkCzqfKrlPRVRtZu3z/d9CZpBGW xx/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712259029; x=1712863829; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YftQBH4K5k1eA4ljqzTyg0/24HcF6aTvgonFgjzZs9Q=; b=lOY4laqoPGOIL+SVpMWFQEUh2AMKdb+XtGq3qJus2QTawepbs2mZKGjh2lj9pMUBHx gKmCW54pKRHg2pUK9CVvu/Mf9S2xCyLCRq89nEKfJ7qOsQDhq8hhjXUV5XNXfoqsyjU2 YqKla2wwvEDXmxN9ePC1zrBs8xR6UauhEqyLZaFc+rdWRLBDTLV8xMVAFgKUHU+YWda+ AedRwI/tJszR4KGlI55ONaEXzt84BRir0VCRFeNiXKyfZQ9Z0euvslloh50oHGdeMgkT mEwfdlsJMhHD9ez7S4iQrkvu+G0qCbEjqVdzljFSxiJ384SFbspNXItzOUqqRgtBWQmP 0PuQ== X-Gm-Message-State: AOJu0YwS7ezdJRmrxQSfrABQG4iuaCx4xaIaA0PEq5w+asrUgoSNrCYv 16atqJqvDLWj5ZyuITbiARrnCDuzZTr+XnS9LlASfWw1wTmIzYEi0UCZVENOqb8= X-Google-Smtp-Source: AGHT+IHCwoiLEcG6OP23A1J6qWX+Ltb1CEDPb6mHfowgHbsbwpZ3SH5Q1cIQNWi+cyWfm3Rk2qcrrQ== X-Received: by 2002:a17:906:456:b0:a4e:2777:37c7 with SMTP id e22-20020a170906045600b00a4e277737c7mr385955eja.49.1712259029236; Thu, 04 Apr 2024 12:30:29 -0700 (PDT) Received: from fedora.fritz.box (aftr-82-135-80-212.dynamic.mnet-online.de. [82.135.80.212]) by smtp.gmail.com with ESMTPSA id t25-20020a170906269900b00a4c9b39b726sm9394909ejc.75.2024.04.04.12.30.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 12:30:28 -0700 (PDT) From: Thorsten Blum To: "David S. Miller" , Andreas Larsson Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, Thorsten Blum Subject: [PATCH] sparc: Compare pointers to NULL instead of 0 Date: Thu, 4 Apr 2024 21:29:33 +0200 Message-ID: <20240404192932.13075-2-thorsten.blum@toblux.com> X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: sparclinux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Fixes the following two Coccinelle/coccicheck warnings reported by badzero.cocci: WARNING comparing pointer to 0 WARNING comparing pointer to 0 Signed-off-by: Thorsten Blum Reviewed-by: Andreas Larsson --- arch/sparc/prom/tree_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sparc/prom/tree_64.c b/arch/sparc/prom/tree_64.c index 989e7992d629..88793e5b0ab5 100644 --- a/arch/sparc/prom/tree_64.c +++ b/arch/sparc/prom/tree_64.c @@ -332,7 +332,7 @@ prom_setprop(phandle node, const char *pname, char *value, int size) if (size == 0) return 0; - if ((pname == 0) || (value == 0)) + if ((pname == NULL) || (value == NULL)) return 0; #ifdef CONFIG_SUN_LDOMS