linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] misc: ocxl: link: Remove unnecessary (void*) conversions
@ 2023-11-13  1:45 Li zeming
  2023-11-14 12:53 ` Frederic Barrat
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Li zeming @ 2023-11-13  1:45 UTC (permalink / raw)
  To: fbarrat, ajd, arnd, gregkh; +Cc: linuxppc-dev, linux-kernel, Li zeming

The link pointer does not need to cast the type.

Signed-off-by: Li zeming <zeming@nfschina.com>
---
 drivers/misc/ocxl/link.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/misc/ocxl/link.c b/drivers/misc/ocxl/link.c
index c06c699c0e7b1..03402203cacdb 100644
--- a/drivers/misc/ocxl/link.c
+++ b/drivers/misc/ocxl/link.c
@@ -188,7 +188,7 @@ static void xsl_fault_handler_bh(struct work_struct *fault_work)
 
 static irqreturn_t xsl_fault_handler(int irq, void *data)
 {
-	struct ocxl_link *link = (struct ocxl_link *) data;
+	struct ocxl_link *link = data;
 	struct spa *spa = link->spa;
 	u64 dsisr, dar, pe_handle;
 	struct pe_data *pe_data;
@@ -483,7 +483,7 @@ static void release_xsl(struct kref *ref)
 
 void ocxl_link_release(struct pci_dev *dev, void *link_handle)
 {
-	struct ocxl_link *link = (struct ocxl_link *) link_handle;
+	struct ocxl_link *link = link_handle;
 
 	mutex_lock(&links_list_lock);
 	kref_put(&link->ref, release_xsl);
@@ -540,7 +540,7 @@ int ocxl_link_add_pe(void *link_handle, int pasid, u32 pidr, u32 tidr,
 		void (*xsl_err_cb)(void *data, u64 addr, u64 dsisr),
 		void *xsl_err_data)
 {
-	struct ocxl_link *link = (struct ocxl_link *) link_handle;
+	struct ocxl_link *link = link_handle;
 	struct spa *spa = link->spa;
 	struct ocxl_process_element *pe;
 	int pe_handle, rc = 0;
@@ -630,7 +630,7 @@ EXPORT_SYMBOL_GPL(ocxl_link_add_pe);
 
 int ocxl_link_update_pe(void *link_handle, int pasid, __u16 tid)
 {
-	struct ocxl_link *link = (struct ocxl_link *) link_handle;
+	struct ocxl_link *link = link_handle;
 	struct spa *spa = link->spa;
 	struct ocxl_process_element *pe;
 	int pe_handle, rc;
@@ -666,7 +666,7 @@ int ocxl_link_update_pe(void *link_handle, int pasid, __u16 tid)
 
 int ocxl_link_remove_pe(void *link_handle, int pasid)
 {
-	struct ocxl_link *link = (struct ocxl_link *) link_handle;
+	struct ocxl_link *link = link_handle;
 	struct spa *spa = link->spa;
 	struct ocxl_process_element *pe;
 	struct pe_data *pe_data;
@@ -752,7 +752,7 @@ EXPORT_SYMBOL_GPL(ocxl_link_remove_pe);
 
 int ocxl_link_irq_alloc(void *link_handle, int *hw_irq)
 {
-	struct ocxl_link *link = (struct ocxl_link *) link_handle;
+	struct ocxl_link *link = link_handle;
 	int irq;
 
 	if (atomic_dec_if_positive(&link->irq_available) < 0)
@@ -771,7 +771,7 @@ EXPORT_SYMBOL_GPL(ocxl_link_irq_alloc);
 
 void ocxl_link_free_irq(void *link_handle, int hw_irq)
 {
-	struct ocxl_link *link = (struct ocxl_link *) link_handle;
+	struct ocxl_link *link = link_handle;
 
 	xive_native_free_irq(hw_irq);
 	atomic_inc(&link->irq_available);
-- 
2.18.2


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

* Re: [PATCH] misc: ocxl: link: Remove unnecessary (void*) conversions
  2023-11-13  1:45 [PATCH] misc: ocxl: link: Remove unnecessary (void*) conversions Li zeming
@ 2023-11-14 12:53 ` Frederic Barrat
  2023-11-20  4:12 ` Andrew Donnellan
  2023-12-07 12:38 ` Michael Ellerman
  2 siblings, 0 replies; 4+ messages in thread
From: Frederic Barrat @ 2023-11-14 12:53 UTC (permalink / raw)
  To: Li zeming, ajd, arnd, gregkh; +Cc: linuxppc-dev, linux-kernel



On 13/11/2023 02:45, Li zeming wrote:
> The link pointer does not need to cast the type.
> 
> Signed-off-by: Li zeming <zeming@nfschina.com>
> ---


Acked-by: Frederic Barrat <fbarrat@linux.ibm.com>

   Fred


>   drivers/misc/ocxl/link.c | 14 +++++++-------
>   1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/misc/ocxl/link.c b/drivers/misc/ocxl/link.c
> index c06c699c0e7b1..03402203cacdb 100644
> --- a/drivers/misc/ocxl/link.c
> +++ b/drivers/misc/ocxl/link.c
> @@ -188,7 +188,7 @@ static void xsl_fault_handler_bh(struct work_struct *fault_work)
>   
>   static irqreturn_t xsl_fault_handler(int irq, void *data)
>   {
> -	struct ocxl_link *link = (struct ocxl_link *) data;
> +	struct ocxl_link *link = data;
>   	struct spa *spa = link->spa;
>   	u64 dsisr, dar, pe_handle;
>   	struct pe_data *pe_data;
> @@ -483,7 +483,7 @@ static void release_xsl(struct kref *ref)
>   
>   void ocxl_link_release(struct pci_dev *dev, void *link_handle)
>   {
> -	struct ocxl_link *link = (struct ocxl_link *) link_handle;
> +	struct ocxl_link *link = link_handle;
>   
>   	mutex_lock(&links_list_lock);
>   	kref_put(&link->ref, release_xsl);
> @@ -540,7 +540,7 @@ int ocxl_link_add_pe(void *link_handle, int pasid, u32 pidr, u32 tidr,
>   		void (*xsl_err_cb)(void *data, u64 addr, u64 dsisr),
>   		void *xsl_err_data)
>   {
> -	struct ocxl_link *link = (struct ocxl_link *) link_handle;
> +	struct ocxl_link *link = link_handle;
>   	struct spa *spa = link->spa;
>   	struct ocxl_process_element *pe;
>   	int pe_handle, rc = 0;
> @@ -630,7 +630,7 @@ EXPORT_SYMBOL_GPL(ocxl_link_add_pe);
>   
>   int ocxl_link_update_pe(void *link_handle, int pasid, __u16 tid)
>   {
> -	struct ocxl_link *link = (struct ocxl_link *) link_handle;
> +	struct ocxl_link *link = link_handle;
>   	struct spa *spa = link->spa;
>   	struct ocxl_process_element *pe;
>   	int pe_handle, rc;
> @@ -666,7 +666,7 @@ int ocxl_link_update_pe(void *link_handle, int pasid, __u16 tid)
>   
>   int ocxl_link_remove_pe(void *link_handle, int pasid)
>   {
> -	struct ocxl_link *link = (struct ocxl_link *) link_handle;
> +	struct ocxl_link *link = link_handle;
>   	struct spa *spa = link->spa;
>   	struct ocxl_process_element *pe;
>   	struct pe_data *pe_data;
> @@ -752,7 +752,7 @@ EXPORT_SYMBOL_GPL(ocxl_link_remove_pe);
>   
>   int ocxl_link_irq_alloc(void *link_handle, int *hw_irq)
>   {
> -	struct ocxl_link *link = (struct ocxl_link *) link_handle;
> +	struct ocxl_link *link = link_handle;
>   	int irq;
>   
>   	if (atomic_dec_if_positive(&link->irq_available) < 0)
> @@ -771,7 +771,7 @@ EXPORT_SYMBOL_GPL(ocxl_link_irq_alloc);
>   
>   void ocxl_link_free_irq(void *link_handle, int hw_irq)
>   {
> -	struct ocxl_link *link = (struct ocxl_link *) link_handle;
> +	struct ocxl_link *link = link_handle;
>   
>   	xive_native_free_irq(hw_irq);
>   	atomic_inc(&link->irq_available);

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

* Re: [PATCH] misc: ocxl: link: Remove unnecessary (void*) conversions
  2023-11-13  1:45 [PATCH] misc: ocxl: link: Remove unnecessary (void*) conversions Li zeming
  2023-11-14 12:53 ` Frederic Barrat
@ 2023-11-20  4:12 ` Andrew Donnellan
  2023-12-07 12:38 ` Michael Ellerman
  2 siblings, 0 replies; 4+ messages in thread
From: Andrew Donnellan @ 2023-11-20  4:12 UTC (permalink / raw)
  To: Li zeming, fbarrat, arnd, gregkh; +Cc: linuxppc-dev, linux-kernel

On Mon, 2023-11-13 at 09:45 +0800, Li zeming wrote:
> The link pointer does not need to cast the type.
> 
> Signed-off-by: Li zeming <zeming@nfschina.com>

Acked-by: Andrew Donnellan <ajd@linux.ibm.com>

> ---
>  drivers/misc/ocxl/link.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/misc/ocxl/link.c b/drivers/misc/ocxl/link.c
> index c06c699c0e7b1..03402203cacdb 100644
> --- a/drivers/misc/ocxl/link.c
> +++ b/drivers/misc/ocxl/link.c
> @@ -188,7 +188,7 @@ static void xsl_fault_handler_bh(struct
> work_struct *fault_work)
>  
>  static irqreturn_t xsl_fault_handler(int irq, void *data)
>  {
> -	struct ocxl_link *link = (struct ocxl_link *) data;
> +	struct ocxl_link *link = data;
>  	struct spa *spa = link->spa;
>  	u64 dsisr, dar, pe_handle;
>  	struct pe_data *pe_data;
> @@ -483,7 +483,7 @@ static void release_xsl(struct kref *ref)
>  
>  void ocxl_link_release(struct pci_dev *dev, void *link_handle)
>  {
> -	struct ocxl_link *link = (struct ocxl_link *) link_handle;
> +	struct ocxl_link *link = link_handle;
>  
>  	mutex_lock(&links_list_lock);
>  	kref_put(&link->ref, release_xsl);
> @@ -540,7 +540,7 @@ int ocxl_link_add_pe(void *link_handle, int
> pasid, u32 pidr, u32 tidr,
>  		void (*xsl_err_cb)(void *data, u64 addr, u64 dsisr),
>  		void *xsl_err_data)
>  {
> -	struct ocxl_link *link = (struct ocxl_link *) link_handle;
> +	struct ocxl_link *link = link_handle;
>  	struct spa *spa = link->spa;
>  	struct ocxl_process_element *pe;
>  	int pe_handle, rc = 0;
> @@ -630,7 +630,7 @@ EXPORT_SYMBOL_GPL(ocxl_link_add_pe);
>  
>  int ocxl_link_update_pe(void *link_handle, int pasid, __u16 tid)
>  {
> -	struct ocxl_link *link = (struct ocxl_link *) link_handle;
> +	struct ocxl_link *link = link_handle;
>  	struct spa *spa = link->spa;
>  	struct ocxl_process_element *pe;
>  	int pe_handle, rc;
> @@ -666,7 +666,7 @@ int ocxl_link_update_pe(void *link_handle, int
> pasid, __u16 tid)
>  
>  int ocxl_link_remove_pe(void *link_handle, int pasid)
>  {
> -	struct ocxl_link *link = (struct ocxl_link *) link_handle;
> +	struct ocxl_link *link = link_handle;
>  	struct spa *spa = link->spa;
>  	struct ocxl_process_element *pe;
>  	struct pe_data *pe_data;
> @@ -752,7 +752,7 @@ EXPORT_SYMBOL_GPL(ocxl_link_remove_pe);
>  
>  int ocxl_link_irq_alloc(void *link_handle, int *hw_irq)
>  {
> -	struct ocxl_link *link = (struct ocxl_link *) link_handle;
> +	struct ocxl_link *link = link_handle;
>  	int irq;
>  
>  	if (atomic_dec_if_positive(&link->irq_available) < 0)
> @@ -771,7 +771,7 @@ EXPORT_SYMBOL_GPL(ocxl_link_irq_alloc);
>  
>  void ocxl_link_free_irq(void *link_handle, int hw_irq)
>  {
> -	struct ocxl_link *link = (struct ocxl_link *) link_handle;
> +	struct ocxl_link *link = link_handle;
>  
>  	xive_native_free_irq(hw_irq);
>  	atomic_inc(&link->irq_available);

-- 
Andrew Donnellan    OzLabs, ADL Canberra
ajd@linux.ibm.com   IBM Australia Limited

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

* Re: [PATCH] misc: ocxl: link: Remove unnecessary (void*) conversions
  2023-11-13  1:45 [PATCH] misc: ocxl: link: Remove unnecessary (void*) conversions Li zeming
  2023-11-14 12:53 ` Frederic Barrat
  2023-11-20  4:12 ` Andrew Donnellan
@ 2023-12-07 12:38 ` Michael Ellerman
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2023-12-07 12:38 UTC (permalink / raw)
  To: fbarrat, ajd, arnd, gregkh, Li zeming; +Cc: linuxppc-dev, linux-kernel

On Mon, 13 Nov 2023 09:45:33 +0800, Li zeming wrote:
> The link pointer does not need to cast the type.
> 
> 

Applied to powerpc/next.

[1/1] misc: ocxl: link: Remove unnecessary (void*) conversions
      https://git.kernel.org/powerpc/c/220f3ced8e42b1efe9c6b84778fb0c77c0c56611

cheers

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

end of thread, other threads:[~2023-12-07 12:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-13  1:45 [PATCH] misc: ocxl: link: Remove unnecessary (void*) conversions Li zeming
2023-11-14 12:53 ` Frederic Barrat
2023-11-20  4:12 ` Andrew Donnellan
2023-12-07 12:38 ` Michael Ellerman

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).