[kernel/2.6.38] fix gcc-4.6 set but unused warnings
[openwrt.git] / target / linux / generic / patches-2.6.32 / 009-jffs-fix-min-max-confusion.patch
1 From 0fed784b0f1ecf57d568ae60b2cada43f9d90759 Mon Sep 17 00:00:00 2001
2 From: Roel Kluin <roel.kluin@gmail.com>
3 Date: Sat, 21 Nov 2009 16:34:36 +0100
4 Subject: [PATCH] JFFS2: fix min/max confusion
5
6 MAX_SUMMARY_SIZE was meant as a limit, not as a minimum
7
8 Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
9 Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
10 Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
11 ---
12 fs/jffs2/summary.c | 2 +-
13 1 files changed, 1 insertions(+), 1 deletions(-)
14
15 --- a/fs/jffs2/summary.c
16 +++ b/fs/jffs2/summary.c
17 @@ -23,7 +23,7 @@
18
19 int jffs2_sum_init(struct jffs2_sb_info *c)
20 {
21 - uint32_t sum_size = max_t(uint32_t, c->sector_size, MAX_SUMMARY_SIZE);
22 + uint32_t sum_size = min_t(uint32_t, c->sector_size, MAX_SUMMARY_SIZE);
23
24 c->summary = kzalloc(sizeof(struct jffs2_summary), GFP_KERNEL);
25
This page took 0.041483 seconds and 5 git commands to generate.