[PATCH 1/2] udf: fix udf_error build warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "George G. Davis" <george_davis@xxxxxxxxxx>

The v2.6.34.14 commit "d7542a6 udf: Avoid run away loop when partition
table length is corrupted" introduced the following build warning due
to a thinko when backporting an upstream fix to v2.6.34.14:

 CC      fs/udf/super.o
fs/udf/super.c: In function 'udf_load_sparable_map':
fs/udf/super.c:1259: warning: passing argument 3 of 'udf_error' makes pointer from integer without a cast
fs/udf/super.c:1265: warning: passing argument 3 of 'udf_error' makes pointer from integer without a cast
fs/udf/super.c: In function 'udf_load_logicalvol':
fs/udf/super.c:1313: warning: passing argument 3 of 'udf_error' makes pointer from integer without a cast

The above warnings are due to a missing __func__ argument in the above
udf_error function calls. These warnings will likely cause an oops
when the above lines are executed although this has not been verified.

Add the missing __func__ argument to fix the build warnings.

Signed-off-by: George G. Davis <george_davis@xxxxxxxxxx>
---
 fs/udf/super.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/fs/udf/super.c b/fs/udf/super.c
index 1d36fdd..5ece6d6 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -1254,13 +1254,15 @@ static int udf_load_sparable_map(struct super_block *sb,
 	map->s_partition_type = UDF_SPARABLE_MAP15;
 	sdata->s_packet_len = le16_to_cpu(spm->packetLength);
 	if (!is_power_of_2(sdata->s_packet_len)) {
-		udf_error(sb, "error loading logical volume descriptor: "
+		udf_error(sb, __func__,
+			  "error loading logical volume descriptor: "
 			  "Invalid packet length %u\n",
 			  (unsigned)sdata->s_packet_len);
 		return -EIO;
 	}
 	if (spm->numSparingTables > 4) {
-		udf_error(sb, "error loading logical volume descriptor: "
+		udf_error(sb, __func__,
+			  "error loading logical volume descriptor: "
 			  "Too many sparing tables (%d)\n",
 			  (int)spm->numSparingTables);
 		return -EIO;
@@ -1308,7 +1310,8 @@ static int udf_load_logicalvol(struct super_block *sb, sector_t block,
 	lvd = (struct logicalVolDesc *)bh->b_data;
 	table_len = le32_to_cpu(lvd->mapTableLength);
 	if (table_len > sb->s_blocksize - sizeof(*lvd)) {
-		udf_error(sb, "error loading logical volume descriptor: "
+		udf_error(sb, __func__,
+			  "error loading logical volume descriptor: "
 			  "Partition table too long (%u > %lu)\n", table_len,
 			  sb->s_blocksize - sizeof(*lvd));
 		goto out_bh;
-- 
1.7.11.7

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]