Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp132489ybm; Tue, 26 May 2020 12:34:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/tRi9KRG4iff56oBMVP8vnlPCqa7jROhW2N0kIkXoC9EgVObx8sLRRwZiLfGKPIsjMkSd X-Received: by 2002:aa7:d999:: with SMTP id u25mr21905376eds.339.1590521692409; Tue, 26 May 2020 12:34:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590521692; cv=none; d=google.com; s=arc-20160816; b=kTRJlnUHvTssWvQSkxL/XMel92AZRTjhkPvR87OhzO8/9T96LtNayKB7wiW33A1hgq j9/w27W2QHeBelwS4FnonklHdxbNy446LHwfxV3h++ID/Uj5aDCJyIaOYJu0bv0q5s1L 3iWhUR4GfiwnpQU8rhm4DXt4rMtyFZcr6xpqZO6uMo72OCwwUH/vJhuiCafrzZAp63Ai wJv2F+tTe6HoTUAu/Q42c/E31fHj6R0zB+7scxoba12NUZiaHaW3Dlrft/w3ewEfEMaO 8b8IKaHXbPQ5hRyseBlW6kI7jhe41PmZWENoq/w5KIbExoiYIeRhqGN6OAdRO3WW0gf2 XTKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=No5Gipv7yG8XAvIA0cXTiU5P5Bx6l/gV76aOivSGyT8=; b=MwwSrN2m1OF4Zc5En0mfsm2yHNQgw2Z7ErYa1I/NZFUaCNH2cfJht5peGifv/wC5zz p9Q9/CqjT5YyXXsSu3N2kCR+JJAtAHZlHnbDXhrSwEj12IIliBSAPf2ZypCzID4O1zfs LOtOEh5HEM7vtWJtLwYQWVy3ica/P+2F2zLfIu0O24uxh3wZfeWZXaYlGmDE4YNAKzVO zQz78E1LdPNCWFQldDZ3XxRemQtLL/fQe0QdOee6a9/KFFoOAQ5Hld1nC+Mj9qI/yi/j f76UJS5ECQhCRUxePnqiBvEt99qQXPqNbcCKW8spr89oZAlWPWa/D/FcGy4ocbzeedOS fanA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=P1DhE66c; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f19si407637edx.127.2020.05.26.12.34.29; Tue, 26 May 2020 12:34:52 -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=default header.b=P1DhE66c; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729163AbgEZTbs (ORCPT + 99 others); Tue, 26 May 2020 15:31:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:51986 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390346AbgEZS61 (ORCPT ); Tue, 26 May 2020 14:58:27 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B375F208B3; Tue, 26 May 2020 18:58:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590519507; bh=Q0mdcF2oU/bh0nji/h7eSWN/ItT2o83JBEzU6HfSmMM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P1DhE66ceFT8Sf/fe7qDF9RCWNTlUe5MsxGOX0o9SkYZuwwveAwQaLCu/mmgpzaYB RZseVXnYiKKinEfaarnmM0ohL6be0zugcjBAKf5ZgwnzdvsFN0qnjCzxgSAt3C2GhM 0tPBBw2HhusjzUVWRmfE8FBAxCpMRJuBkvym7Ppc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Jason A. Donenfeld" , Dan Carpenter , Steffen Klassert , Herbert Xu , Ben Hutchings Subject: [PATCH 4.9 03/64] padata: get_next is never NULL Date: Tue, 26 May 2020 20:52:32 +0200 Message-Id: <20200526183914.315757266@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200526183913.064413230@linuxfoundation.org> References: <20200526183913.064413230@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jason A. Donenfeld commit 69b348449bda0f9588737539cfe135774c9939a7 upstream. Per Dan's static checker warning, the code that returns NULL was removed in 2010, so this patch updates the comments and fixes the code assumptions. Signed-off-by: Jason A. Donenfeld Reported-by: Dan Carpenter Acked-by: Steffen Klassert Signed-off-by: Herbert Xu Cc: Ben Hutchings Signed-off-by: Greg Kroah-Hartman --- kernel/padata.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) --- a/kernel/padata.c +++ b/kernel/padata.c @@ -156,8 +156,6 @@ EXPORT_SYMBOL(padata_do_parallel); * A pointer to the control struct of the next object that needs * serialization, if present in one of the percpu reorder queues. * - * NULL, if all percpu reorder queues are empty. - * * -EINPROGRESS, if the next object that needs serialization will * be parallel processed by another cpu and is not yet present in * the cpu's reorder queue. @@ -184,8 +182,6 @@ static struct padata_priv *padata_get_ne cpu = padata_index_to_cpu(pd, next_index); next_queue = per_cpu_ptr(pd->pqueue, cpu); - padata = NULL; - reorder = &next_queue->reorder; spin_lock(&reorder->lock); @@ -237,12 +233,11 @@ static void padata_reorder(struct parall padata = padata_get_next(pd); /* - * All reorder queues are empty, or the next object that needs - * serialization is parallel processed by another cpu and is - * still on it's way to the cpu's reorder queue, nothing to - * do for now. + * If the next object that needs serialization is parallel + * processed by another cpu and is still on it's way to the + * cpu's reorder queue, nothing to do for now. */ - if (!padata || PTR_ERR(padata) == -EINPROGRESS) + if (PTR_ERR(padata) == -EINPROGRESS) break; /*