linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Drop unused helpers from <linux/ata.h>
@ 2023-02-24 20:39 Sergey Shtylyov
  2023-02-24 20:39 ` [PATCH 1/2] ata: drop unused ata_id_to_hd_driveid() Sergey Shtylyov
  2023-02-25  9:18 ` [PATCH 0/2] Drop unused helpers from <linux/ata.h> Sergey Shtylyov
  0 siblings, 2 replies; 5+ messages in thread
From: Sergey Shtylyov @ 2023-02-24 20:39 UTC (permalink / raw)
  To: Damien Le Moal, linux-ide

Here are 2 patches against the 'for-next' branch of Damien Le Moal's
'libata.git' repo.

All the functions moved from drivers/ide/ (with a rename) to <linux/ata.h>
by Bart Z. (back then drivers/ide/ maintainer) never saw any use except by
drivers/ide/ -- thus, when it was removed from the kernel, these functions
became unused; 3 of them have been dropped by Niklas Cassel, and now I am
dropping 2 remaining functions...

Sergey Shtylyov (2):
  ata: drop unused ata_id_to_hd_driveid()
  ata: drop unused ata_id_is_lba_capacity_ok()

 include/linux/ata.h | 71 ---------------------------------------------
 1 file changed, 71 deletions(-)

-- 
2.26.3


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] ata: drop unused ata_id_to_hd_driveid()
  2023-02-24 20:39 [PATCH 0/2] Drop unused helpers from <linux/ata.h> Sergey Shtylyov
@ 2023-02-24 20:39 ` Sergey Shtylyov
  2023-02-25  9:18 ` [PATCH 0/2] Drop unused helpers from <linux/ata.h> Sergey Shtylyov
  1 sibling, 0 replies; 5+ messages in thread
From: Sergey Shtylyov @ 2023-02-24 20:39 UTC (permalink / raw)
  To: Damien Le Moal, linux-ide

This function was renamed from ide_id_to_hd_driveid() and moved from
drivers/ide/ to <linux/ata.h> but it never got used by libata, thus it
became useless after drivers/ide/ removal...

Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
 include/linux/ata.h | 21 ---------------------
 1 file changed, 21 deletions(-)

diff --git a/include/linux/ata.h b/include/linux/ata.h
index 0c18499f60b6..3240116647d5 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -16,7 +16,6 @@
 #include <linux/bits.h>
 #include <linux/string.h>
 #include <linux/types.h>
-#include <asm/byteorder.h>
 
 /* defines only for the constants which don't work well as enums */
 #define ATA_DMA_BOUNDARY	0xffffUL
@@ -1067,26 +1066,6 @@ static inline bool ata_id_is_lba_capacity_ok(u16 *id)
 	return false;	/* LBA capacity value may be bad */
 }
 
-static inline void ata_id_to_hd_driveid(u16 *id)
-{
-#ifdef __BIG_ENDIAN
-	/* accessed in struct hd_driveid as 8-bit values */
-	id[ATA_ID_MAX_MULTSECT]	 = __cpu_to_le16(id[ATA_ID_MAX_MULTSECT]);
-	id[ATA_ID_CAPABILITY]	 = __cpu_to_le16(id[ATA_ID_CAPABILITY]);
-	id[ATA_ID_OLD_PIO_MODES] = __cpu_to_le16(id[ATA_ID_OLD_PIO_MODES]);
-	id[ATA_ID_OLD_DMA_MODES] = __cpu_to_le16(id[ATA_ID_OLD_DMA_MODES]);
-	id[ATA_ID_MULTSECT]	 = __cpu_to_le16(id[ATA_ID_MULTSECT]);
-
-	/* as 32-bit values */
-	*(u32 *)&id[ATA_ID_LBA_CAPACITY] = ata_id_u32(id, ATA_ID_LBA_CAPACITY);
-	*(u32 *)&id[ATA_ID_SPG]		 = ata_id_u32(id, ATA_ID_SPG);
-
-	/* as 64-bit value */
-	*(u64 *)&id[ATA_ID_LBA_CAPACITY_2] =
-		ata_id_u64(id, ATA_ID_LBA_CAPACITY_2);
-#endif
-}
-
 static inline bool ata_ok(u8 status)
 {
 	return ((status & (ATA_BUSY | ATA_DRDY | ATA_DF | ATA_DRQ | ATA_ERR))
-- 
2.26.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] Drop unused helpers from <linux/ata.h>
  2023-02-24 20:39 [PATCH 0/2] Drop unused helpers from <linux/ata.h> Sergey Shtylyov
  2023-02-24 20:39 ` [PATCH 1/2] ata: drop unused ata_id_to_hd_driveid() Sergey Shtylyov
@ 2023-02-25  9:18 ` Sergey Shtylyov
  1 sibling, 0 replies; 5+ messages in thread
From: Sergey Shtylyov @ 2023-02-25  9:18 UTC (permalink / raw)
  To: Damien Le Moal, linux-ide

On 2/24/23 11:39 PM, Sergey Shtylyov wrote:

> Here are 2 patches against the 'for-next' branch of Damien Le Moal's
> 'libata.git' repo.
> 
> All the functions moved from drivers/ide/ (with a rename) to <linux/ata.h>
> by Bart Z. (back then drivers/ide/ maintainer) never saw any use except by
> drivers/ide/ -- thus, when it was removed from the kernel, these functions
> became unused; 3 of them have been dropped by Niklas Cassel, and now I am
> dropping 2 remaining functions...
> 
> Sergey Shtylyov (2):
>   ata: drop unused ata_id_to_hd_driveid()
>   ata: drop unused ata_id_is_lba_capacity_ok()
> 
>  include/linux/ata.h | 71 ---------------------------------------------
>  1 file changed, 71 deletions(-)

   Sorry for trying to send the same series twice, and ignore this one please.
I forgot how to run 'git send-email' again... :-/

MBR, Sergey

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] Drop unused helpers from <linux/ata.h>
  2023-02-24 20:40 Sergey Shtylyov
@ 2023-03-08  8:49 ` Damien Le Moal
  0 siblings, 0 replies; 5+ messages in thread
From: Damien Le Moal @ 2023-03-08  8:49 UTC (permalink / raw)
  To: Sergey Shtylyov, linux-ide

On 2/25/23 05:40, Sergey Shtylyov wrote:
> Here are 2 patches against the 'for-next' branch of Damien Le Moal's
> 'libata.git' repo.
> 
> All the functions moved from drivers/ide/ (with a rename) to <linux/ata.h>
> by Bart Z. (back then drivers/ide/ maintainer) never saw any use except by
> drivers/ide/ -- thus, when it was removed from the kernel, these functions
> became unused; 3 of them have been dropped by Niklas Cassel, and now I am
> dropping 2 remaining functions...
> 
> Sergey Shtylyov (2):
>   ata: drop unused ata_id_to_hd_driveid()
>   ata: drop unused ata_id_is_lba_capacity_ok()
> 
>  include/linux/ata.h | 71 ---------------------------------------------
>  1 file changed, 71 deletions(-)
> 

Applied to for-6.4. Thanks !

-- 
Damien Le Moal
Western Digital Research


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 0/2] Drop unused helpers from <linux/ata.h>
@ 2023-02-24 20:40 Sergey Shtylyov
  2023-03-08  8:49 ` Damien Le Moal
  0 siblings, 1 reply; 5+ messages in thread
From: Sergey Shtylyov @ 2023-02-24 20:40 UTC (permalink / raw)
  To: Damien Le Moal, linux-ide

Here are 2 patches against the 'for-next' branch of Damien Le Moal's
'libata.git' repo.

All the functions moved from drivers/ide/ (with a rename) to <linux/ata.h>
by Bart Z. (back then drivers/ide/ maintainer) never saw any use except by
drivers/ide/ -- thus, when it was removed from the kernel, these functions
became unused; 3 of them have been dropped by Niklas Cassel, and now I am
dropping 2 remaining functions...

Sergey Shtylyov (2):
  ata: drop unused ata_id_to_hd_driveid()
  ata: drop unused ata_id_is_lba_capacity_ok()

 include/linux/ata.h | 71 ---------------------------------------------
 1 file changed, 71 deletions(-)

-- 
2.26.3


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-03-08  8:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-24 20:39 [PATCH 0/2] Drop unused helpers from <linux/ata.h> Sergey Shtylyov
2023-02-24 20:39 ` [PATCH 1/2] ata: drop unused ata_id_to_hd_driveid() Sergey Shtylyov
2023-02-25  9:18 ` [PATCH 0/2] Drop unused helpers from <linux/ata.h> Sergey Shtylyov
2023-02-24 20:40 Sergey Shtylyov
2023-03-08  8:49 ` Damien Le Moal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).