Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp107651ybm; Tue, 26 May 2020 11:59:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrWHD0JaZGVUrMwUCRjuedIS2Dgv42vP+KwQ7O0PnaJYNLlk4UtYDq1a9DrZz7j/BAM+wx X-Received: by 2002:a17:906:4dc3:: with SMTP id f3mr2335480ejw.323.1590519584144; Tue, 26 May 2020 11:59:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590519584; cv=none; d=google.com; s=arc-20160816; b=rxQwa78jFtUw97X4g4o5PEUikD1zNhMcmaXMrWAzFVxQ1LhE6MywLEigHjTFb/YFWu 3iOwHIafDLA03rsutThKYC0KpOrewHH+CG2jebWM0Cc11qZMOp26xi5D8WcZ2GAXPnSL 1SBydSwRxi5aA/YntTbjmVq58Ju8Qyl0NR7h9NlvqlCq4bn9GH8B7pwWIM5mwanwhWR4 pFjm33q4VSCrvNXG5NBUHANBjFGgKjhgHhxb5uvboXH9XI59Nr0USRM1v3GyqxKxifjN FgsL6UKroGcbhv+EPJ7GYFpe7L68aV+iOh+t7k1588AjC2TdNbPS5uoJmDg9DfezeZXu xlsQ== 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=efU6PxmeYj0AcrGBU9FhFEidlCOG/THCtOYJtG3iCGQ=; b=LrkNWShmjzcJRR9j36tSrr4CJaeZt/Rb3onGNKho+ZLE1pbRTFuogkW1qMvk9qa1Ra 7ZCPJ3A2kN5uIEjBQWjGX1oaJVoRj2Zk36tT9kQDzGDktC1j31Z1FeLz3qgj454MsEy3 jz0pWmZeUGBsOu1RN2zrN6St6X6rkhJW9K/Pft9/DRncYTwDcOv5AhSYZeLIZBss9Yeq 4Zchi5UR33Tsi7p7btxSzEzGD39qjxDAecVwngWGCbk0nwBxlb3r/ayZ5UNqULBjVMBn Is0KiC8q8yXupgd6qkG3D18L3mwCVybGOLBlvXUKDwEEWJY7l4gNEXLwjtaNxLEiOnjO YcKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=H3PRGKSc; 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 r13si387386edt.263.2020.05.26.11.59.21; Tue, 26 May 2020 11:59:44 -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=H3PRGKSc; 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 S2389441AbgEZSzT (ORCPT + 99 others); Tue, 26 May 2020 14:55:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:47580 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389398AbgEZSzQ (ORCPT ); Tue, 26 May 2020 14:55:16 -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 0E7EF208C3; Tue, 26 May 2020 18:55:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590519315; bh=K997vUReKo1Eu7O2mp1JLzaOpovFSgasgP9aL7NtB+g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H3PRGKScyKupNgRntLWzDv5HK48gz3XRiaBBDAUCgT+giABNVXxKM8KzbAVGW3Ts+ nyPZyHVMkvXq/Z7GsKGkB1NpE38qlx57ZEoKbBjmQylaLgQROzpTiS2rIVXrfgAHTg d3jGmubKeVhzM4HBmn7HfatbT2hVUh0jx0ZfnPM0= 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.4 03/65] padata: get_next is never NULL Date: Tue, 26 May 2020 20:52:22 +0200 Message-Id: <20200526183907.627545971@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200526183905.988782958@linuxfoundation.org> References: <20200526183905.988782958@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 @@ -155,8 +155,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. @@ -183,8 +181,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); @@ -236,12 +232,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; /*