Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp386016lqh; Fri, 31 May 2024 04:41:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU9VZbRRToWbovAIX7bkN9uLOy6fdQB5tuINSnOsYmPhsc6H1/wvEmwygSoMkxi46eM09F7dDY07rCC37uJPD0PSSN4EQN9EFSiOAP8Qg== X-Google-Smtp-Source: AGHT+IE7U+w7CdeUjVJ2SAUigbVt9CS8lVKyo3pV5yDPtJHJFUfoTFmWkG6cgnGFFmN/CcM46RoN X-Received: by 2002:a17:90a:bf16:b0:2be:9547:41a8 with SMTP id 98e67ed59e1d1-2c1dc5d9f17mr1393983a91.48.1717155695804; Fri, 31 May 2024 04:41:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717155695; cv=pass; d=google.com; s=arc-20160816; b=DcPfKUzh8HLrQSVelmE2xt+HYNY4iphRGVXlHDkjxhHnKPDziiZnrK99bBWK6Zb0zc ka21EB40ZaUQ69lKJT/jfCURZ5IGKU+IP1gUDtPGo5I8HIWAs9wAAymWM57WoJqluNi1 zOWRJwZ/v7+P6BcJoik4n4kW8GikTu12z56FRkQ/d2enUqW/ooxj4AAQFUhfurvn56at l39dJLEh/n3OUTPr/8bWFpx9dOUgcfiaSRXgrxtAQqa+q3JNZKv/XJLGNDwEbDwj/vXU clsDiJ3g5zDQQhX6tbt2ZvRoNyCASATbrCkyQSkmt1/YrKyrgmioi1BNqqGw63nhcY1w owwg== 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:message-id:date:subject:cc:to :from; bh=7mHKZMjHN4n4upds9zIJMR8yJuZCtn5hzKxcTGgDStU=; fh=0p6yNNBQuz1kuO+uhkWgc3ULTag34/CUE4AAVW/K1gY=; b=Cwg/DGuln6yW2oR6jXqqcpQyBOrpJzzPiSqewoo21EDV7kyViIvXPF11ZxmF75BBVT IaDlOsmM52BnbvZXcas2PrDc9d+dpnbjjQgYtselita66xbBz+12zmTTK5oDM3IdZYUa z5joTbyNj3gdKw6vBO3k50K6i5bmgMEaJtYrRjIMhHsJcLPxO9kGhp+V05cu6VjBd1wL +nZXvAQVcBFP+xn5gKXQSz0ZUxwoaGFefbakytnc2PIkTpSBUw4POunQsCy6D8JbE2Y+ FF/JXlt324hFeEyExu+Of2Y75yKAjSe9kFedSKbDq/w2wJN61/IH0yubV+yJOcOvkYn2 9OMA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=unisoc.com); spf=pass (google.com: domain of linux-kernel+bounces-196737-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196737-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c1a777ab4dsi3252129a91.43.2024.05.31.04.41.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 04:41:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196737-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=unisoc.com); spf=pass (google.com: domain of linux-kernel+bounces-196737-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196737-linux.lists.archive=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id F2090288DD5 for ; Fri, 31 May 2024 11:32:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 26E9A157483; Fri, 31 May 2024 11:32:12 +0000 (UTC) Received: from SHSQR01.spreadtrum.com (unknown [222.66.158.135]) (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 6A1A0155C87 for ; Fri, 31 May 2024 11:32:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=222.66.158.135 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717155131; cv=none; b=Yb2bdgWK1tD9siMl/bq8l11zKZFLzFZupct+RX/+FBkwezUjEUpOr8k+YWTy9prVvmNqz0tboRzenAPZqRCqJY7mfFIeHtFsP6plSpWO/gLycIwOTqIPOtdQDfCfXHeLiTB9paFBkV9jwSx9lYRlAJFGJPI0My7Sdd8L8w1fII0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717155131; c=relaxed/simple; bh=W97XgZ013twIobtXTwIaYlD+FlPJM3ZrqLVVtcPYlB8=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=RegEPevXOMXLpUaVNeFuhg+6v1u51fpRtCZVYfoGTejhP3mIAbjgdM3Xj9MiP8Z41ejZJBlA825LmFrmWgjFXXm3I/01/Iu5Tkxfbs8b2zjy5Xa3FGNg9FU1qyQjTm23Eeb/jOrROd4vWa143k590mGCrA+woyTRFcxMdOJCKU8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=unisoc.com; spf=pass smtp.mailfrom=unisoc.com; arc=none smtp.client-ip=222.66.158.135 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=unisoc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=unisoc.com Received: from dlp.unisoc.com ([10.29.3.86]) by SHSQR01.spreadtrum.com with ESMTP id 44VBVSdt090530; Fri, 31 May 2024 19:31:28 +0800 (+08) (envelope-from Zhiguo.Niu@unisoc.com) Received: from SHDLP.spreadtrum.com (bjmbx02.spreadtrum.com [10.0.64.8]) by dlp.unisoc.com (SkyGuard) with ESMTPS id 4VrLSp0x3kz2QN5wn; Fri, 31 May 2024 19:27:38 +0800 (CST) Received: from bj08434pcu.spreadtrum.com (10.0.73.87) by BJMBX02.spreadtrum.com (10.0.64.8) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Fri, 31 May 2024 19:31:27 +0800 From: Zhiguo Niu To: CC: , , , , , Subject: [PATCH] block: uapi: Fix compliation warning of using IOPRIO_PRIO_DATA Date: Fri, 31 May 2024 19:31:11 +0800 Message-ID: <1717155071-20409-1-git-send-email-zhiguo.niu@unisoc.com> X-Mailer: git-send-email 1.9.1 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="UTF-8" Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SHCAS03.spreadtrum.com (10.0.1.207) To BJMBX02.spreadtrum.com (10.0.64.8) X-MAIL:SHSQR01.spreadtrum.com 44VBVSdt090530 Generally, the input of IOPRIO_PRIO_DATA has 16 bits. If use format "%d" to printk IOPRIO_PRIO_DATA, there will be the following warning or error. fs/f2fs/sysfs.c:348:31: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long unsigned int’ [-Wformat=] return sysfs_emit(buf, "%s,%d\n", ~^ %ld This is because the output of IOPRIO_PRIO_DATA is converted to "UL" from IOPRIO_PRIO_MASK, which is not reasonable. unsigned int is more suitable. Signed-off-by: Zhiguo Niu --- include/uapi/linux/ioprio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/ioprio.h b/include/uapi/linux/ioprio.h index bee2bdb0..9ead07f 100644 --- a/include/uapi/linux/ioprio.h +++ b/include/uapi/linux/ioprio.h @@ -11,7 +11,7 @@ #define IOPRIO_CLASS_SHIFT 13 #define IOPRIO_NR_CLASSES 8 #define IOPRIO_CLASS_MASK (IOPRIO_NR_CLASSES - 1) -#define IOPRIO_PRIO_MASK ((1UL << IOPRIO_CLASS_SHIFT) - 1) +#define IOPRIO_PRIO_MASK ((1U << IOPRIO_CLASS_SHIFT) - 1) #define IOPRIO_PRIO_CLASS(ioprio) \ (((ioprio) >> IOPRIO_CLASS_SHIFT) & IOPRIO_CLASS_MASK) -- 1.9.1