From patchwork Thu Feb 27 13:36:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 230242 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54EA3C52D37 for ; Thu, 27 Feb 2020 14:33:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2347224656 for ; Thu, 27 Feb 2020 14:33:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582814012; bh=j0fReE2jsNbtiJWgJbFRTOm8cy02fxQnFVLmTF8Ts1s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=jQG6I53zxAPgplMWeLveacXzmD6EsZ1XiHXWSM/SPzoLRU6DikruaoNgePDRAyP4N YfW32/SzwQy2BKIqq4Tv0I7wtB9mADZiW2by+pXZP+QOXjjZkzDhVGh7ALxgFK7ruM q0GS6QABN2IkZqA0nM7JX5AI1xRXy3pQFEBRT53Y= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732739AbgB0OA1 (ORCPT ); Thu, 27 Feb 2020 09:00:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:33816 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732752AbgB0OA1 (ORCPT ); Thu, 27 Feb 2020 09:00:27 -0500 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 1F74E20578; Thu, 27 Feb 2020 14:00:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582812026; bh=j0fReE2jsNbtiJWgJbFRTOm8cy02fxQnFVLmTF8Ts1s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UJolh78+Kfl/Kjkyr1lYUP9HlWjWGFL62wAT8ZE3J28KEZicSjMGC6VfLaGGvkvPr c6NPL9PtpEy8F4g7vi/fxnbEHy1QY1n7SUsmoaggYkf/xBT2JKJDeJRa9ogvyBKrdr neCldVThIW34Q4bwiN/6u5c0abZXLTETeenX9rWI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nathan Chancellor , Andrew Morton , Linus Torvalds , Sasha Levin Subject: [PATCH 4.14 156/237] lib/scatterlist.c: adjust indentation in __sg_alloc_table Date: Thu, 27 Feb 2020 14:36:10 +0100 Message-Id: <20200227132308.023147258@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200227132255.285644406@linuxfoundation.org> References: <20200227132255.285644406@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Nathan Chancellor [ Upstream commit 4e456fee215677584cafa7f67298a76917e89c64 ] Clang warns: ../lib/scatterlist.c:314:5: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] return -ENOMEM; ^ ../lib/scatterlist.c:311:4: note: previous statement is here if (prv) ^ 1 warning generated. This warning occurs because there is a space before the tab on this line. Remove it so that the indentation is consistent with the Linux kernel coding style and clang no longer warns. Link: http://lkml.kernel.org/r/20191218033606.11942-1-natechancellor@gmail.com Link: https://github.com/ClangBuiltLinux/linux/issues/830 Fixes: edce6820a9fd ("scatterlist: prevent invalid free when alloc fails") Signed-off-by: Nathan Chancellor Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- lib/scatterlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/scatterlist.c b/lib/scatterlist.c index 11fce289d1166..834c846c5af84 100644 --- a/lib/scatterlist.c +++ b/lib/scatterlist.c @@ -317,7 +317,7 @@ int __sg_alloc_table(struct sg_table *table, unsigned int nents, if (prv) table->nents = ++table->orig_nents; - return -ENOMEM; + return -ENOMEM; } sg_init_table(sg, alloc_size);