From patchwork Fri Jan 26 13:43:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Six X-Patchwork-Id: 866332 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3zSgMF15RGz9s75 for ; Sat, 27 Jan 2018 00:52:25 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id A7785C22414; Fri, 26 Jan 2018 13:46:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 62320C224C9; Fri, 26 Jan 2018 13:45:04 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id B0B8DC22020; Fri, 26 Jan 2018 13:44:59 +0000 (UTC) Received: from smtprelay02.ispgateway.de (smtprelay02.ispgateway.de [80.67.31.29]) by lists.denx.de (Postfix) with ESMTPS id 6B8B7C22427 for ; Fri, 26 Jan 2018 13:44:59 +0000 (UTC) Received: from [80.151.34.241] (helo=bob3.testumgebung.local) by smtprelay02.ispgateway.de with esmtpa (Exim 4.89) (envelope-from ) id 1ef4JQ-0000Rh-Oh; Fri, 26 Jan 2018 14:45:00 +0100 From: Mario Six To: U-Boot Mailing List , Stefan Roese , Masahiro Yamada , Simon Glass , Marek Vasut , Patrice Chotard Date: Fri, 26 Jan 2018 14:43:32 +0100 Message-Id: <20180126134356.9393-2-mario.six@gdsys.cc> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180126134356.9393-1-mario.six@gdsys.cc> References: <20180126134356.9393-1-mario.six@gdsys.cc> X-Df-Sender: bWFyaW8uc2l4QGdkc3lzLmNj Subject: [U-Boot] [PATCH v3 02/26] cfi_flash: Fix style of pointer declarations X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" In a pointer declaration there should not be a space between the asterisk and the pointer name. Fix all instances where this occurs. Signed-off-by: Mario Six --- v2 -> v3: * Added proper commit message v1 -> v2: None --- drivers/mtd/cfi_flash.c | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) -- 2.11.0 diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index 0dc7f4a6ba..a1b217cc0c 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -204,7 +204,7 @@ unsigned long flash_sector_size(flash_info_t *info, flash_sect_t sect) * create an address based on the offset and the port width */ static inline void * -flash_map(flash_info_t * info, flash_sect_t sect, uint offset) +flash_map(flash_info_t *info, flash_sect_t sect, uint offset) { unsigned int byte_offset = offset * info->portwidth; @@ -283,7 +283,7 @@ static void flash_printqry(struct cfi_qry *qry) /*----------------------------------------------------------------------- * read a character at a port width address */ -static inline uchar flash_read_uchar(flash_info_t * info, uint offset) +static inline uchar flash_read_uchar(flash_info_t *info, uint offset) { uchar *cp; uchar retval; @@ -301,7 +301,7 @@ static inline uchar flash_read_uchar(flash_info_t * info, uint offset) /*----------------------------------------------------------------------- * read a word at a port width address, assume 16bit bus */ -static inline ushort flash_read_word(flash_info_t * info, uint offset) +static inline ushort flash_read_word(flash_info_t *info, uint offset) { ushort *addr, retval; @@ -316,7 +316,7 @@ static inline ushort flash_read_word(flash_info_t * info, uint offset) * read a long word by picking the least significant byte of each maximum * port size word. Swap for ppc format. */ -static ulong flash_read_long (flash_info_t * info, flash_sect_t sect, +static ulong flash_read_long (flash_info_t *info, flash_sect_t sect, uint offset) { uchar *addr; @@ -402,7 +402,7 @@ static void flash_write_cmd(flash_info_t *info, flash_sect_t sect, flash_unmap(info, sect, offset, addr); } -static void flash_unlock_seq(flash_info_t * info, flash_sect_t sect) +static void flash_unlock_seq(flash_info_t *info, flash_sect_t sect) { flash_write_cmd(info, sect, info->addr_unlock1, AMD_CMD_UNLOCK_START); flash_write_cmd(info, sect, info->addr_unlock2, AMD_CMD_UNLOCK_ACK); @@ -410,7 +410,7 @@ static void flash_unlock_seq(flash_info_t * info, flash_sect_t sect) /*----------------------------------------------------------------------- */ -static int flash_isequal(flash_info_t * info, flash_sect_t sect, +static int flash_isequal(flash_info_t *info, flash_sect_t sect, uint offset, uchar cmd) { void *addr; @@ -458,7 +458,7 @@ static int flash_isequal(flash_info_t * info, flash_sect_t sect, /*----------------------------------------------------------------------- */ -static int flash_isset(flash_info_t * info, flash_sect_t sect, +static int flash_isset(flash_info_t *info, flash_sect_t sect, uint offset, uchar cmd) { void *addr; @@ -491,7 +491,7 @@ static int flash_isset(flash_info_t * info, flash_sect_t sect, /*----------------------------------------------------------------------- */ -static int flash_toggle(flash_info_t * info, flash_sect_t sect, +static int flash_toggle(flash_info_t *info, flash_sect_t sect, uint offset, uchar cmd) { void *addr; @@ -529,7 +529,7 @@ static int flash_toggle(flash_info_t * info, flash_sect_t sect, * This routine checks the status of the chip and returns true if the * chip is busy. */ -static int flash_is_busy(flash_info_t * info, flash_sect_t sect) +static int flash_is_busy(flash_info_t *info, flash_sect_t sect) { int retval; @@ -566,7 +566,7 @@ static int flash_is_busy(flash_info_t * info, flash_sect_t sect) * wait for XSR.7 to be set. Time out with an error if it does not. * This routine does not set the flash to read-array mode. */ -static int flash_status_check(flash_info_t * info, flash_sect_t sector, +static int flash_status_check(flash_info_t *info, flash_sect_t sector, ulong tout, char *prompt) { ulong start; @@ -604,7 +604,7 @@ static int flash_status_check(flash_info_t * info, flash_sect_t sector, * * This routine sets the flash to read-array mode. */ -static int flash_full_status_check(flash_info_t * info, flash_sect_t sector, +static int flash_full_status_check(flash_info_t *info, flash_sect_t sector, ulong tout, char *prompt) { int retcode; @@ -709,7 +709,7 @@ static int flash_status_poll(flash_info_t *info, void *src, void *dst, /*----------------------------------------------------------------------- */ -static void flash_add_byte(flash_info_t * info, cfiword_t * cword, uchar c) +static void flash_add_byte(flash_info_t *info, cfiword_t *cword, uchar c) { #if defined(__LITTLE_ENDIAN) && !defined(CONFIG_SYS_WRITE_SWAPPED_DATA) unsigned short w; @@ -755,7 +755,7 @@ static void flash_add_byte(flash_info_t * info, cfiword_t * cword, uchar c) * Loop through the sector table starting from the previously found sector. * Searches forwards or backwards, dependent on the passed address. */ -static flash_sect_t find_sector(flash_info_t * info, ulong addr) +static flash_sect_t find_sector(flash_info_t *info, ulong addr) { static flash_sect_t saved_sector; /* previously found sector */ static flash_info_t *saved_info; /* previously used flash bank */ @@ -781,7 +781,7 @@ static flash_sect_t find_sector(flash_info_t * info, ulong addr) /*----------------------------------------------------------------------- */ -static int flash_write_cfiword(flash_info_t * info, ulong dest, +static int flash_write_cfiword(flash_info_t *info, ulong dest, cfiword_t cword) { void *dstaddr = (void *)dest; @@ -869,7 +869,7 @@ static int flash_write_cfiword(flash_info_t * info, ulong dest, #ifdef CONFIG_SYS_FLASH_USE_BUFFER_WRITE -static int flash_write_cfibuffer(flash_info_t * info, ulong dest, uchar * cp, +static int flash_write_cfibuffer(flash_info_t *info, ulong dest, uchar *cp, int len) { flash_sect_t sector; @@ -1051,7 +1051,7 @@ out_unmap: /*----------------------------------------------------------------------- */ -int flash_erase(flash_info_t * info, int s_first, int s_last) +int flash_erase(flash_info_t *info, int s_first, int s_last) { int rcode = 0; int prot; @@ -1200,7 +1200,7 @@ static int sector_erased(flash_info_t *info, int i) } #endif /* CONFIG_SYS_FLASH_EMPTY_INFO */ -void flash_print_info(flash_info_t * info) +void flash_print_info(flash_info_t *info) { int i; @@ -1315,7 +1315,7 @@ void flash_print_info(flash_info_t * info) * 1 - write timeout * 2 - Flash not erased */ -int write_buff(flash_info_t * info, uchar * src, ulong addr, ulong cnt) +int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt) { ulong wp; uchar *p; @@ -1475,7 +1475,7 @@ static int cfi_protect_bugfix(flash_info_t *info, long sector, int prot) return 0; } -int flash_real_protect(flash_info_t * info, long sector, int prot) +int flash_real_protect(flash_info_t *info, long sector, int prot) { int retcode = 0; @@ -1601,7 +1601,7 @@ int flash_real_protect(flash_info_t * info, long sector, int prot) /*----------------------------------------------------------------------- * flash_read_user_serial - read the OneTimeProgramming cells */ -void flash_read_user_serial(flash_info_t * info, void *buffer, int offset, +void flash_read_user_serial(flash_info_t *info, void *buffer, int offset, int len) { uchar *src; @@ -1619,7 +1619,7 @@ void flash_read_user_serial(flash_info_t * info, void *buffer, int offset, /* * flash_read_factory_serial - read the device Id from the protection area */ -void flash_read_factory_serial(flash_info_t * info, void *buffer, int offset, +void flash_read_factory_serial(flash_info_t *info, void *buffer, int offset, int len) { uchar *src; @@ -1771,7 +1771,7 @@ static int cmdset_amd_init(flash_info_t *info, struct cfi_qry *qry) } #ifdef CONFIG_FLASH_CFI_LEGACY -static void flash_read_jedec_ids(flash_info_t * info) +static void flash_read_jedec_ids(flash_info_t *info) { info->manufacturer_id = 0; info->device_id = 0; @@ -1890,7 +1890,7 @@ static void __flash_cmd_reset(flash_info_t *info) void flash_cmd_reset(flash_info_t *info) __attribute__((weak,alias("__flash_cmd_reset"))); -static int __flash_detect_cfi(flash_info_t * info, struct cfi_qry *qry) +static int __flash_detect_cfi(flash_info_t *info, struct cfi_qry *qry) { int cfi_offset; @@ -1944,7 +1944,7 @@ static int __flash_detect_cfi(flash_info_t * info, struct cfi_qry *qry) return 0; } -static int flash_detect_cfi(flash_info_t * info, struct cfi_qry *qry) +static int flash_detect_cfi(flash_info_t *info, struct cfi_qry *qry) { debug("flash detect cfi\n");