mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jerry Leo <jerryleo860202@gmail.com>
To: jack@suse.cz
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] quota: integer constant is too large for ‘long’ type in
Date: Tue, 15 Dec 2009 21:27:50 +0800	[thread overview]
Message-ID: <6304b52b0912150527v48056ccam8d1c318bcd7e085b@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1240 bytes --]

Hi, Jan Kara,

the Patch is for this:

CC      fs/quota/quota_v2.o
fs/quota/quota_v2.c: In function ‘v2_read_file_info’:
fs/quota/quota_v2.c:123: warning: integer constant is too large for ‘long’ type
fs/quota/quota_v2.c:124: warning: integer constant is too large for ‘long’ type


Can this patch be fixed?


diff --git a/linux-2.6/fs/quota/quota_v2.c.orig b/linux-2.6/fs/quota/quota_v2.c
index 3dfc23e..be9ea1e 100644
--- a/linux-2.6/fs/quota/quota_v2.c.orig
+++ b/linux-2.6/fs/quota/quota_v2.c
@@ -120,8 +120,8 @@ static int v2_read_file_info(struct super_block
*sb, int type)
                info->dqi_maxilimit = 0xffffffff;
        } else {
                /* used space is stored as unsigned 64-bit value */
-               info->dqi_maxblimit = 0xffffffffffffffff;       /* 2^64-1 */
-               info->dqi_maxilimit = 0xffffffffffffffff;
+               info->dqi_maxblimit = 0xFFFFFFFFFFFFFFFFLL;     /* 2^64-1 */
+               info->dqi_maxilimit = 0xFFFFFFFFFFFFFFFFLL;
        }
        info->dqi_bgrace = le32_to_cpu(dinfo.dqi_bgrace);
        info->dqi_igrace = le32_to_cpu(dinfo.dqi_igrace);


Best Regards!

                                                                   JerryLeo

[-- Attachment #2: patch --]
[-- Type: application/octet-stream, Size: 691 bytes --]

diff --git a/linux-2.6/fs/quota/quota_v2.c.orig b/linux-2.6/fs/quota/quota_v2.c
index 3dfc23e..be9ea1e 100644
--- a/linux-2.6/fs/quota/quota_v2.c.orig
+++ b/linux-2.6/fs/quota/quota_v2.c
@@ -120,8 +120,8 @@ static int v2_read_file_info(struct super_block *sb, int type)
 		info->dqi_maxilimit = 0xffffffff;
 	} else {
 		/* used space is stored as unsigned 64-bit value */
-		info->dqi_maxblimit = 0xffffffffffffffff;	/* 2^64-1 */
-		info->dqi_maxilimit = 0xffffffffffffffff;
+		info->dqi_maxblimit = 0xFFFFFFFFFFFFFFFFLL;	/* 2^64-1 */
+		info->dqi_maxilimit = 0xFFFFFFFFFFFFFFFFLL;
 	}
 	info->dqi_bgrace = le32_to_cpu(dinfo.dqi_bgrace);
 	info->dqi_igrace = le32_to_cpu(dinfo.dqi_igrace);

             reply	other threads:[~2009-12-15 13:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-15 13:27 Jerry Leo [this message]
2009-12-15 15:24 ` Joe Perches
2009-12-15 21:30   ` Jan Kara
2009-12-15 21:28 ` Jan Kara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6304b52b0912150527v48056ccam8d1c318bcd7e085b@mail.gmail.com \
    --to=jerryleo860202@gmail.com \
    --cc=jack@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®