]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
block: constify sect_buf argument of ide_write_data
authorGabor Juhos <juhosg@openwrt.org>
Sun, 26 May 2013 10:11:28 +0000 (12:11 +0200)
committerMacpaul Lin <macpaul@gmail.com>
Wed, 24 Jul 2013 03:49:17 +0000 (11:49 +0800)
Add a const keyword to the sect_buf argument of
ide_write_data to fix the following warning:

  cmd_ide.c: In function '__ide_output_data':
  cmd_ide.c:548: warning: passing argument 2 of 'ide_write_data' discards qualifiers from pointer target type
  /devel/u-boot.git/include/ide.h:76: note: expected 'ulong *' but argument is of type 'const ulong *'

Also modify the driver-model documentation to
match with the new prototype.

Compile tested only.

Cc: Macpaul Lin <macpaul@andestech.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
doc/driver-model/UDM-block.txt
drivers/block/ftide020.c
include/ide.h

index 5d5c7760176742989858fdec6b1cbf2f0f461e79..b42ec69c941df96f62b0f450436f1da97286d560 100644 (file)
@@ -93,7 +93,7 @@ I) Overview
       uchar ide_read_register(int dev, unsigned int port);
       void  ide_write_register(int dev, unsigned int port, unsigned char val);
       void  ide_read_data(int dev, ulong *sect_buf, int words);
-      void  ide_write_data(int dev, ulong *sect_buf, int words);
+      void  ide_write_data(int dev, const ulong *sect_buf, int words);
 
     The first two functions are called from ide_inb()/ide_outb(), and will
     default to direct memory access if CONFIG_IDE_AHB is not set, or
index ad8fdad7c228756f56a73cf585284769c4618e0f..61900ba248a01c5ca5e50b1ef1343cdf5437ff0a 100644 (file)
@@ -81,7 +81,7 @@ void ide_write_register(int dev, unsigned int port, unsigned char val)
                IDE_REG_DA_WRITE(port) | val);
 }
 
-void ide_write_data(int dev, ulong *sect_buf, int words)
+void ide_write_data(int dev, const ulong *sect_buf, int words)
 {
        static struct ftide020_s *ftide020 = (struct ftide020_s *) FTIDE_BASE;
 
index 59ea9758a7d90e0d43033a81ab3a74a0eee77cf6..0269d516dc6d768e1a757a573206dc474a8d4052 100644 (file)
@@ -76,7 +76,7 @@ int ide_device_present(int dev);
 unsigned char ide_read_register(int dev, unsigned int port);
 void ide_write_register(int dev, unsigned int port, unsigned char val);
 void ide_read_data(int dev, ulong *sect_buf, int words);
-void ide_write_data(int dev, ulong *sect_buf, int words);
+void ide_write_data(int dev, const ulong *sect_buf, int words);
 #endif
 
 /*