From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 B7A9F1D933A for ; Thu, 17 Oct 2024 09:40:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729158021; cv=none; b=FulHjm4lbcK94R4TAtnLmsxipprpqEpInJdSahe2Z/ofEeYGtMRxQejwFVsMRpzFFNtdEungAqwegVQti3qe04LBB9livrjH++XjpQvOe1z8fZ+whfbggX5uergjkALWBRVDCsCJO8vFPYzLKA4PfJMGs0EC79yLOeq7Wm/PoCg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729158021; c=relaxed/simple; bh=sztngNhovEqaCnRoJiQBIujJEUd20TeJ4hbc8EmN2oI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Oqn/YbWncB12HoQrWiMMCq6+OSf2EG+jVowac89STqJH8UaM+BfyxiWEY9ae5PfRaeKKPouIDlGuZ3M6Vd/Wa+oqRCGdwsLrvSk/8xBQRsBpVWhlGwM7hMwsYDsFMr6jIaity5zLIHdxMLb0Z71Qw/Wyune/QxvQ4vN/IXGGois= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 25A3BC4CEC5; Thu, 17 Oct 2024 09:40:19 +0000 (UTC) Date: Thu, 17 Oct 2024 10:40:17 +0100 From: Catalin Marinas To: Pintu Kumar Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, skhan@linuxfoundation.org, pintu.ping@gmail.com Subject: Re: [PATCH] mm/kmemleak: fix errors/warnings for coding style Message-ID: References: <20241014183918.30123-1-quic_pintu@quicinc.com> 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=us-ascii Content-Disposition: inline In-Reply-To: <20241014183918.30123-1-quic_pintu@quicinc.com> On Tue, Oct 15, 2024 at 12:09:18AM +0530, Pintu Kumar wrote: > There are several errors/warnings reported by checkpatch. > Fix all of the positive once as below: > - Use #include instead of > - Missing a blank lines after declarations > - Prefer 'unsigned int' to bare use of 'unsigned' > - else should follow close brace '}' I wouldn't bother fixing up the style in existing code, it just makes backporting fixes harder. > @@ -2179,8 +2180,7 @@ static int __init kmemleak_boot_config(char *str) > else if (strcmp(str, "on") == 0) { > kmemleak_skip_disable = 1; > stack_depot_request_early_init(); > - } > - else > + } else > return -EINVAL; > return 0; According to the coding style doc, the 'else' branch also needs braces here. -- Catalin