From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from canpmsgout07.his.huawei.com (canpmsgout07.his.huawei.com [113.46.200.222]) (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 3BF8329AB1A for ; Wed, 29 Jul 2026 11:05:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.222 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785323150; cv=none; b=ElrCrXpgUX6xNE+NpVfH50nS7I1TbmhH7pwbZ6ARgWf/N3PXWxmHyc1iWvlcyAJOUHtW6/PF/+mg4caBtxA8a9c/OlveEc0w2uvPxnWFL2Iu2AGLFQ5dx5r5L9vTCykxPWm1F7/RfGRvdip/s7AVX/1jZwOw2xhdsAO64w5u8VU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785323150; c=relaxed/simple; bh=5gxdatNsvubOXGg3n7TN4Df2e9ZzEkapy7g+GJ0Qp04=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=LU7Q0y4eQXGeF9RAmf2XqOYg79StFPts0kTK9u/ccrWgIURDQdnwXykhqiGKcGn30rBqLWtoMRONTas4UavwRWP25YXiOPmlC++CHTieAmQ1Sgq4ShoPd3/XTgwlrx1w6y5LzYiQLhjEdn4rrF4Z4gAR5sFS63Co2y3OvZoHSQY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b=c92r8y0o; arc=none smtp.client-ip=113.46.200.222 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b="c92r8y0o" dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=nKnSp+DAhepZLZpNrbELj6U71g3n9QSJp5+YuUnoIlk=; b=c92r8y0oks28LUVaE8I3DeK2DPSlyXBBjKnIfUW5m26IpsN5vYP0mft+dBDozRHlvA0xjJyox 9jVw4trpwSCF6tYYCLLGbScwmDIa/h0EYEuyOTGGawOdfih5+jnl5/V57c4ujiq3+py3eyKvFvs LI4luROKv0lKZ5lGXDwlPA8= Received: from mail.maildlp.com (unknown [172.19.162.92]) by canpmsgout07.his.huawei.com (SkyGuard) with ESMTPS id 4h98QT35jKzLlXD; Wed, 29 Jul 2026 18:56:17 +0800 (CST) Received: from whupemo500009.china.huawei.com (unknown [7.152.184.116]) by mail.maildlp.com (Postfix) with ESMTPS id 7505040586; Wed, 29 Jul 2026 19:05:44 +0800 (CST) Received: from localhost (10.50.87.202) by whupemo500009.china.huawei.com (7.152.184.116) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Wed, 29 Jul 2026 19:05:43 +0800 From: Jiacheng Yu To: CC: , , , , , , Jiacheng Yu Subject: [PATCH] mm/shmem: drop redundant casts in shmem_evict_inode() pr_warn Date: Wed, 29 Jul 2026 12:12:00 +0000 Message-ID: <20260729121201.776566-1-yujiacheng3@huawei.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260728124919.c023a7f9b8be446bb785ec82@linux-foundation.org> References: <20260728124919.c023a7f9b8be446bb785ec82@linux-foundation.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: kwepems200001.china.huawei.com (7.221.188.67) To whupemo500009.china.huawei.com (7.152.184.116) blkcnt_t and i_ino are u64, %llu matches both directly, so drop the casts. Signed-off-by: Jiacheng Yu --- On Tue, 28 Jul 2026 Andrew Morton wrote: > I don't think the i_ino cast is needed? > > blkcnt_t was possibly 32-bit a long time ago but > afaict it's now unconditionally u64. yes -- i_ino is u64 since 0b2600f81cef ("treewide: change inode->i_ino from unsigned long to u64"), and blkcnt_t is unconditionally u64, so both casts can go. mm/shmem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/shmem.c b/mm/shmem.c index 223484cdc8f2..96cf73c906df 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -1430,8 +1430,7 @@ static void shmem_evict_inode(struct inode *inode) shmem_free_inode(inode->i_sb, freed); if (inode->i_blocks) pr_warn("%s: ino=%llu i_blocks=%llu alloced=%lu swapped=%lu nrpages=%lu\n", - __func__, (unsigned long long)inode->i_ino, - (unsigned long long)inode->i_blocks, + __func__, inode->i_ino, inode->i_blocks, info->alloced, info->swapped, inode->i_mapping->nrpages); clear_inode(inode); #ifdef CONFIG_TMPFS_QUOTA -- 2.34.1