Received: by 2002:ab2:788f:0:b0:1ee:8f2e:70ae with SMTP id b15csp486055lqi; Thu, 7 Mar 2024 03:15:41 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV8jjGFvOZR4Q6iCUtRDCbi11GIEp9+YwNKTBtbU3J7hnJhdO4/gwPMMS0ZivR5tELEvc/vsgzdRuMJVcghvZZcKIuAI3CVqtDGH45NBA== X-Google-Smtp-Source: AGHT+IEwkCxU+uVH+kkt14ez3QTFbC5nyBOuX4W41hknbqexLvTQI+9JL7OerwcNaCRIUDdCv2Xd X-Received: by 2002:a05:6e02:1e0a:b0:365:b4c7:5e9d with SMTP id g10-20020a056e021e0a00b00365b4c75e9dmr20059206ila.27.1709810141257; Thu, 07 Mar 2024 03:15:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709810141; cv=pass; d=google.com; s=arc-20160816; b=ZkhGUv8dbM2SW/Oh2TIPEvnn2BFwV9K6+zk0ugZhKHyDawfbjRdhJCYafpO1cBq7ui BeK9+s4cQOs7V6N7rprv4i/azzwV7Zhxfu1RBii3xZoBCjqEzvI5KYkTIBqgzybhZgyb Kg75s3EMk2s54o64cZpc5aC6LT1Kv/r6/njB8Y+tRadkCP53CojiSvaA6RVgtDKWom9G gL9qCCi2qJ1yz8s6O5JWj/UFn0vlLZ0ef3kjw745/CR0LcRiJ7lMFx8Mn7wHk1fYQ0Ku LmuB30k3u67C0EkXK4KurNrUFNlaWRoAv+l7tPKlv7OUgH+jJAnINdifJfRiWGeKtLSN O7Kw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:subject :references:in-reply-to:cc:to:from:dkim-signature; bh=t7hvztox8E3djn1VPBiITPW1z/LEpMaRGTOuDbIFdwo=; fh=dYz3JtEZ3z52anLqT1MPYzvi97p4PqySNs+sY0EgKYE=; b=h22K0k+3XfKokgvhkb6Yuqmi5fou59na1cKCepgOZVsH+ZF/5EoSvemL3nTxRzUUoN I1RXDVQFJdZ6jmyNUGqvFZKOPY8gggdfGJ/BwDG8FhKCmaLBKoX7xsi095XJFSa+Rfw6 Zy1f2cy/okC18Rdu3GbnfSRCLFrngXn1fhzftiU5W/Gvhi/uAPiUqh5W3VvVynYSPHoE VtBiZ8wTU9Y37KJ7FXLwSiSna6LLZM6dOMKsdopOYcXFMLtVtUysTQuq8hyW0MJByuRV IrUGeEf5B2trtFjubGZDkDsbrOqedVXdgFgBkhvO+cR2Nu4FJnbJf33/P30/hlsbG7+I CO2w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=djwt2YzF; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-95307-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95307-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id jw6-20020a056a00928600b006e6488c30f7si3779183pfb.198.2024.03.07.03.15.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 03:15:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-95307-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=djwt2YzF; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-95307-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95307-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 48817B251F0 for ; Thu, 7 Mar 2024 10:11:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A33B6128832; Thu, 7 Mar 2024 10:09:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="djwt2YzF" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) (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 42CE4839F5; Thu, 7 Mar 2024 10:09:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.21 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709806196; cv=none; b=HaSHwxg8scvz1KUwSv8FoiItcnSqh4SzfpFHIEGHCr5kwSA+GWLJvvHQ8Qub2B7umM7UEQqVfJJOEBo8I0qx4vic7ekTtkfaRAxByjfkj4Rrf6W2pN3jOxo3JeChPiuXv8WUVaJi2YxN9gxCR5zF0q7eyt6QAmoNjI6w5w1jUkM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709806196; c=relaxed/simple; bh=vh1KTvU7pgzsNqD/jqUFcTHIz8fH1XhJOVJN36h5elM=; h=From:To:Cc:In-Reply-To:References:Subject:Message-Id:Date: MIME-Version:Content-Type; b=fyhRpZIrEPYkhkYKcQjEqRp79EYmyPp8Tws/q0M9F1oZeTJBBvO0it9r1s1f1AI8WsIBLwkekpNyH6HZByY++I29pbqLFrkAwjxNpQsKlsJ3xxRkOG5oMH4xTVt3Fw/mP6O8p9aSg+JIMdlnuzjWelPlyfBcTWy+nfNyKU3OCdU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=djwt2YzF; arc=none smtp.client-ip=198.175.65.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709806195; x=1741342195; h=from:to:cc:in-reply-to:references:subject:message-id: date:mime-version:content-transfer-encoding; bh=vh1KTvU7pgzsNqD/jqUFcTHIz8fH1XhJOVJN36h5elM=; b=djwt2YzFgaDGEImHg9+rRheVtXZVAZCjyW/cVkU8S3HaYih6qujYzw8O +M4fUJemWKaonMRVDLW5Ik5YSgwxSUpBH3L9UHvVWS85NQKAQySfMEoDM ARyIfI+K84FklXDtFr2S4hZIg223MmM2hpb+38bqF2Qt3COjOUE11nLpX /pucgbU1yTMYSEQ9bV/gilQxtsxafUgm0g5KJ5nN2+2LojT7m34U0jTMi elkup9hoG2yCw7hxQA6VeFdPDMfTrF6aTPq/5a8jkK3OaFRLzHnNVkNgF b1T8noDNC+PS8OLV3ZPubbjWlhLI0i1732kgEcUlgmTQ59SEi1shpu2TW A==; X-IronPort-AV: E=McAfee;i="6600,9927,11005"; a="4398717" X-IronPort-AV: E=Sophos;i="6.06,211,1705392000"; d="scan'208";a="4398717" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2024 02:09:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,211,1705392000"; d="scan'208";a="14728012" Received: from ijarvine-desk1.ger.corp.intel.com (HELO localhost) ([10.245.244.169]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2024 02:09:51 -0800 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= To: Vadim Pasternak , Daniil Dulov Cc: Mark Gross , Andy Shevchenko , Darren Hart , Hans de Goede , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org In-Reply-To: <20240306153804.6509-1-d.dulov@aladdin.ru> References: <20240306153804.6509-1-d.dulov@aladdin.ru> Subject: Re: [PATCH] platform/mellanox: mlxreg-hotplug: Remove redundant NULL-check Message-Id: <170980618467.1921.15643030796886976535.b4-ty@linux.intel.com> Date: Thu, 07 Mar 2024 12:09:44 +0200 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-Transfer-Encoding: 7bit X-Mailer: b4 0.12.3 On Wed, 06 Mar 2024 18:38:04 +0300, Daniil Dulov wrote: > Pointer item is checked fo NULL at mlxreg_hotplug_work_helper() and then > it is dereferenced to produce dev_err(). > This pointer is also dereferenced before calling this function and should > never be NULL except some piece of hardware is broken as it is said in > the comment before the check. So, this check can be safely removed. > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > [...] Thank you for your contribution, it has been applied to my local review-ilpo branch. Note it will show up in the public platform-drivers-x86/review-ilpo branch only once I've pushed my local branch there, which might take a while. The list of commits applied: [1/1] platform/mellanox: mlxreg-hotplug: Remove redundant NULL-check commit: 576b82c3c9bf021af4984aafc105508c99660667 -- i.