Message ID | 20240226191159.39509-4-martin@kaiser.cx |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-82218-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2294402dyb; Mon, 26 Feb 2024 11:41:01 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCULUzBHdenjHhwQQ0j3EQ9mUyj7CmNkduMlIx8zsh/YnepLkSwNw6rdbv0s8tEPShAmlpJqXXIsyS0WdqM2XLaAkQv7IA== X-Google-Smtp-Source: AGHT+IHg6qhbQJ4x4yvs+bOvY57lTmbZO74MPvMJJgfhlNejA9LUO8kiJnkUpgx3GEqZSRVG6AOE X-Received: by 2002:a17:90b:480b:b0:29a:b67b:fe5e with SMTP id kn11-20020a17090b480b00b0029ab67bfe5emr4033087pjb.36.1708976461730; Mon, 26 Feb 2024 11:41:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708976461; cv=pass; d=google.com; s=arc-20160816; b=snQbzbsesZHb6bXJLAiY273OCnDyTIhz5sBRmzYjbXeU9UVJBanMj1iqy3PhuzyJBM h5+M/61PdDCPzq5sgq/BWMCV/2hSLyNFlTV7TLMOssgi1G4WzHxZZVdegxTQVxlANqDF WQLR2xBz6/iYNBrnzVXfnWilJeuKqgRsN6gJxasOtYEb7y3DMl6k5Q41jxD4Poklj4TT 38AaLfSywP7Mkk7WMHfbqbuPk1bMZx2144RX6dF9Wdy09IjBWcHUZyCqjUwLc56jV5nI LEjgRr1tJIxRVk9mW1vFerXbWnhHg0djJwfxFPeqvlBExMJKy4+grL5TI3Z5npA88EDM VCSA== 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:references:in-reply-to:message-id :date:subject:cc:to:from; bh=lK0TKO5hYAPn3s+ymIobFdJj02ZPmu4MgAlxRWKWl1w=; fh=ZOiUZw78YDuSKEMDtMAAmh4cqNO3x4538nPaaxlot7Y=; b=YLp1z9ikXCHJzm1EvKogXBKAQgl6RBhTRtdSEQCKDAZVEXCH5L7xoyWDkJdGLR1sc3 W01DFPPLzi1oYNpzd74reff7qxDtR3feQkNrLDVVL7+LWm3jqQD1oCN+TwYXyrwQP0N5 kem1FnI4VzI0Jw76wqsoM+7MPaYVAZpwtsxSMrsquz0rGqqM3HJeXQN7YldCc8MHfVWW gWEKDau3ngcjV4YXJrzR8JEyEKyCs/fOCCUvtM1/ke5qwNN5H9j39Ir69d6us1faB+x4 sS4/WOvZqFPnhjB8yMu6/mMLOFljps90L+mVxTQf/ouGyoyBwkBFpd6k1vYGUF+gfjRB MqOw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=kaiser.cx); spf=pass (google.com: domain of linux-kernel+bounces-82218-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82218-ouuuleilei=gmail.com@vger.kernel.org" Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id my12-20020a17090b4c8c00b0029ad60a63aasi898802pjb.142.2024.02.26.11.41.01 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 11:41:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82218-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=kaiser.cx); spf=pass (google.com: domain of linux-kernel+bounces-82218-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82218-ouuuleilei=gmail.com@vger.kernel.org" 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 079ADB2DF88 for <ouuuleilei@gmail.com>; Mon, 26 Feb 2024 19:16:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3CA4613175A; Mon, 26 Feb 2024 19:13:31 +0000 (UTC) Received: from akranes.kaiser.cx (akranes.kaiser.cx [152.53.16.207]) (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 7D5C4130AF3 for <linux-kernel@vger.kernel.org>; Mon, 26 Feb 2024 19:13:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=152.53.16.207 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708974809; cv=none; b=DS/pgP+/wIl9MWfuTaNfTHPNCTDLGlGiJdl4tvWfYhfihPtvUP5UgEgI8pDL3wIQy5k5QbJTGzZLb3Oj9MvCw4IMJ3DcMOhn3EGUZZZXuFJBTZXpvWzOrA9TDVlEkjxkEke1vuBxkj9kVedfrX8U637uYpnU9L4boN3aI+nLurQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708974809; c=relaxed/simple; bh=E1OsgKPBvfp3gZK5Z9YheV3ogwQncmYEzQNRgaWN4iA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=P8PgEiG2WjeZl7sPgqEV3bVAbfT7dWXFjmfklrjgRaUsniPd2gBdrzN7Q568TQBF3Gqo55RTOA1+JqAlx+wQUQDoouJL1zEN8Y0qi28msSLDLQhtXg7gm6qJ8K5E9r5T0/rKvqh280wIUj5V2rAr8Sp6goZBk3vrP9Z2J5Cr2q8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kaiser.cx; spf=pass smtp.mailfrom=kaiser.cx; arc=none smtp.client-ip=152.53.16.207 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kaiser.cx Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kaiser.cx Received: from dslb-188-097-209-155.188.097.pools.vodafone-ip.de ([188.97.209.155] helo=martin-debian-2.paytec.ch) by akranes.kaiser.cx with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from <martin@kaiser.cx>) id 1regPQ-001h9S-0w; Mon, 26 Feb 2024 20:13:04 +0100 From: Martin Kaiser <martin@kaiser.cx> To: Andrew Morton <akpm@linux-foundation.org> Cc: Uladzislau Rezki <urezki@gmail.com>, linux-kernel@vger.kernel.org, Martin Kaiser <martin@kaiser.cx> Subject: [PATCH 3/3] lib/test_vmalloc.c: use unsigned long constant Date: Mon, 26 Feb 2024 20:11:59 +0100 Message-Id: <20240226191159.39509-4-martin@kaiser.cx> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240226191159.39509-1-martin@kaiser.cx> References: <20240226191159.39509-1-martin@kaiser.cx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791991702118619116 X-GMAIL-MSGID: 1791991702118619116 |
Series |
lib/test_vmalloc.c: three trivial fixes
|
|
Commit Message
Martin Kaiser
Feb. 26, 2024, 7:11 p.m. UTC
Use an unsigned long constant instead of an int constant and a cast. This
fixes the checkpatch warning
WARNING: Unnecessary typecast of c90 int constant - '(unsigned long) 1' could be '1UL'
+ align = ((unsigned long) 1) << i;
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
lib/test_vmalloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Mon, Feb 26, 2024 at 08:11:59PM +0100, Martin Kaiser wrote: > Use an unsigned long constant instead of an int constant and a cast. This > fixes the checkpatch warning > > WARNING: Unnecessary typecast of c90 int constant - '(unsigned long) 1' could be '1UL' > + align = ((unsigned long) 1) << i; > > Signed-off-by: Martin Kaiser <martin@kaiser.cx> > --- > lib/test_vmalloc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/test_vmalloc.c b/lib/test_vmalloc.c > index d0c0cbe1913d..4ddf769861ff 100644 > --- a/lib/test_vmalloc.c > +++ b/lib/test_vmalloc.c > @@ -117,7 +117,7 @@ static int align_shift_alloc_test(void) > int i; > > for (i = 0; i < BITS_PER_LONG; i++) { > - align = ((unsigned long) 1) << i; > + align = 1UL << i; > > ptr = __vmalloc_node(PAGE_SIZE, align, GFP_KERNEL|__GFP_ZERO, 0, > __builtin_return_address(0)); > -- > 2.39.2 > Reviewed-by: Uladzislau Rezki (Sony) <urezki@gmail.com> -- Uladzislau Rezki
diff --git a/lib/test_vmalloc.c b/lib/test_vmalloc.c index d0c0cbe1913d..4ddf769861ff 100644 --- a/lib/test_vmalloc.c +++ b/lib/test_vmalloc.c @@ -117,7 +117,7 @@ static int align_shift_alloc_test(void) int i; for (i = 0; i < BITS_PER_LONG; i++) { - align = ((unsigned long) 1) << i; + align = 1UL << i; ptr = __vmalloc_node(PAGE_SIZE, align, GFP_KERNEL|__GFP_ZERO, 0, __builtin_return_address(0));