Linux-ACPI Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] pnp: remove the now unused pnp_find_card function
@ 2020-10-08  6:53 Christoph Hellwig
  2020-10-08 16:01 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2020-10-08  6:53 UTC (permalink / raw)
  To: rafael.j.wysocki; +Cc: linux-acpi, linux-kernel

All user of the pnp_find_card compat wrapper are gone, so remove
the function as well.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 Documentation/admin-guide/pnp.rst |  4 ----
 drivers/pnp/isapnp/compat.c       | 23 -----------------------
 include/linux/isapnp.h            |  6 ------
 3 files changed, 33 deletions(-)

diff --git a/Documentation/admin-guide/pnp.rst b/Documentation/admin-guide/pnp.rst
index bab2d10631f00d..3eda08191d139a 100644
--- a/Documentation/admin-guide/pnp.rst
+++ b/Documentation/admin-guide/pnp.rst
@@ -281,10 +281,6 @@ ISAPNP drivers.  They should serve as a temporary solution only.
 
 They are as follows::
 
-	struct pnp_card *pnp_find_card(unsigned short vendor,
-				       unsigned short device,
-				       struct pnp_card *from)
-
 	struct pnp_dev *pnp_find_dev(struct pnp_card *card,
 				     unsigned short vendor,
 				     unsigned short function,
diff --git a/drivers/pnp/isapnp/compat.c b/drivers/pnp/isapnp/compat.c
index 6c845b6283163d..035e9509248968 100644
--- a/drivers/pnp/isapnp/compat.c
+++ b/drivers/pnp/isapnp/compat.c
@@ -21,28 +21,6 @@ static void pnp_convert_id(char *buf, unsigned short vendor,
 		(device >> 12) & 0x0f, (device >> 8) & 0x0f);
 }
 
-struct pnp_card *pnp_find_card(unsigned short vendor, unsigned short device,
-			       struct pnp_card *from)
-{
-	char id[8];
-	char any[8];
-	struct list_head *list;
-
-	pnp_convert_id(id, vendor, device);
-	pnp_convert_id(any, ISAPNP_ANY_ID, ISAPNP_ANY_ID);
-
-	list = from ? from->global_list.next : pnp_cards.next;
-
-	while (list != &pnp_cards) {
-		struct pnp_card *card = global_to_pnp_card(list);
-
-		if (compare_pnp_id(card->id, id) || (memcmp(id, any, 7) == 0))
-			return card;
-		list = list->next;
-	}
-	return NULL;
-}
-
 struct pnp_dev *pnp_find_dev(struct pnp_card *card, unsigned short vendor,
 			     unsigned short function, struct pnp_dev *from)
 {
@@ -86,5 +64,4 @@ struct pnp_dev *pnp_find_dev(struct pnp_card *card, unsigned short vendor,
 	return NULL;
 }
 
-EXPORT_SYMBOL(pnp_find_card);
 EXPORT_SYMBOL(pnp_find_dev);
diff --git a/include/linux/isapnp.h b/include/linux/isapnp.h
index 11edb2109a68f6..dba18c95844bde 100644
--- a/include/linux/isapnp.h
+++ b/include/linux/isapnp.h
@@ -75,9 +75,6 @@ static inline int isapnp_proc_done(void) { return 0; }
 #endif
 
 /* compat */
-struct pnp_card *pnp_find_card(unsigned short vendor,
-			       unsigned short device,
-			       struct pnp_card *from);
 struct pnp_dev *pnp_find_dev(struct pnp_card *card,
 			     unsigned short vendor,
 			     unsigned short function,
@@ -92,9 +89,6 @@ static inline int isapnp_cfg_end(void) { return -ENODEV; }
 static inline unsigned char isapnp_read_byte(unsigned char idx) { return 0xff; }
 static inline void isapnp_write_byte(unsigned char idx, unsigned char val) { ; }
 
-static inline struct pnp_card *pnp_find_card(unsigned short vendor,
-					     unsigned short device,
-					     struct pnp_card *from) { return NULL; }
 static inline struct pnp_dev *pnp_find_dev(struct pnp_card *card,
 					   unsigned short vendor,
 					   unsigned short function,
-- 
2.28.0


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

* Re: [PATCH] pnp: remove the now unused pnp_find_card function
  2020-10-08  6:53 [PATCH] pnp: remove the now unused pnp_find_card function Christoph Hellwig
@ 2020-10-08 16:01 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2020-10-08 16:01 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Rafael Wysocki, ACPI Devel Maling List, Linux Kernel Mailing List

On Thu, Oct 8, 2020 at 8:53 AM Christoph Hellwig <hch@lst.de> wrote:
>
> All user of the pnp_find_card compat wrapper are gone, so remove
> the function as well.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  Documentation/admin-guide/pnp.rst |  4 ----
>  drivers/pnp/isapnp/compat.c       | 23 -----------------------
>  include/linux/isapnp.h            |  6 ------
>  3 files changed, 33 deletions(-)
>
> diff --git a/Documentation/admin-guide/pnp.rst b/Documentation/admin-guide/pnp.rst
> index bab2d10631f00d..3eda08191d139a 100644
> --- a/Documentation/admin-guide/pnp.rst
> +++ b/Documentation/admin-guide/pnp.rst
> @@ -281,10 +281,6 @@ ISAPNP drivers.  They should serve as a temporary solution only.
>
>  They are as follows::
>
> -       struct pnp_card *pnp_find_card(unsigned short vendor,
> -                                      unsigned short device,
> -                                      struct pnp_card *from)
> -
>         struct pnp_dev *pnp_find_dev(struct pnp_card *card,
>                                      unsigned short vendor,
>                                      unsigned short function,
> diff --git a/drivers/pnp/isapnp/compat.c b/drivers/pnp/isapnp/compat.c
> index 6c845b6283163d..035e9509248968 100644
> --- a/drivers/pnp/isapnp/compat.c
> +++ b/drivers/pnp/isapnp/compat.c
> @@ -21,28 +21,6 @@ static void pnp_convert_id(char *buf, unsigned short vendor,
>                 (device >> 12) & 0x0f, (device >> 8) & 0x0f);
>  }
>
> -struct pnp_card *pnp_find_card(unsigned short vendor, unsigned short device,
> -                              struct pnp_card *from)
> -{
> -       char id[8];
> -       char any[8];
> -       struct list_head *list;
> -
> -       pnp_convert_id(id, vendor, device);
> -       pnp_convert_id(any, ISAPNP_ANY_ID, ISAPNP_ANY_ID);
> -
> -       list = from ? from->global_list.next : pnp_cards.next;
> -
> -       while (list != &pnp_cards) {
> -               struct pnp_card *card = global_to_pnp_card(list);
> -
> -               if (compare_pnp_id(card->id, id) || (memcmp(id, any, 7) == 0))
> -                       return card;
> -               list = list->next;
> -       }
> -       return NULL;
> -}
> -
>  struct pnp_dev *pnp_find_dev(struct pnp_card *card, unsigned short vendor,
>                              unsigned short function, struct pnp_dev *from)
>  {
> @@ -86,5 +64,4 @@ struct pnp_dev *pnp_find_dev(struct pnp_card *card, unsigned short vendor,
>         return NULL;
>  }
>
> -EXPORT_SYMBOL(pnp_find_card);
>  EXPORT_SYMBOL(pnp_find_dev);
> diff --git a/include/linux/isapnp.h b/include/linux/isapnp.h
> index 11edb2109a68f6..dba18c95844bde 100644
> --- a/include/linux/isapnp.h
> +++ b/include/linux/isapnp.h
> @@ -75,9 +75,6 @@ static inline int isapnp_proc_done(void) { return 0; }
>  #endif
>
>  /* compat */
> -struct pnp_card *pnp_find_card(unsigned short vendor,
> -                              unsigned short device,
> -                              struct pnp_card *from);
>  struct pnp_dev *pnp_find_dev(struct pnp_card *card,
>                              unsigned short vendor,
>                              unsigned short function,
> @@ -92,9 +89,6 @@ static inline int isapnp_cfg_end(void) { return -ENODEV; }
>  static inline unsigned char isapnp_read_byte(unsigned char idx) { return 0xff; }
>  static inline void isapnp_write_byte(unsigned char idx, unsigned char val) { ; }
>
> -static inline struct pnp_card *pnp_find_card(unsigned short vendor,
> -                                            unsigned short device,
> -                                            struct pnp_card *from) { return NULL; }
>  static inline struct pnp_dev *pnp_find_dev(struct pnp_card *card,
>                                            unsigned short vendor,
>                                            unsigned short function,
> --

Applied as 5.10 material, thanks!

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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-08  6:53 [PATCH] pnp: remove the now unused pnp_find_card function Christoph Hellwig
2020-10-08 16:01 ` Rafael J. Wysocki

Linux-ACPI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-acpi/0 linux-acpi/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-acpi linux-acpi/ https://lore.kernel.org/linux-acpi \
		linux-acpi@vger.kernel.org
	public-inbox-index linux-acpi

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-acpi


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git