* [PATCH] habanalabs: make some functions static
@ 2023-02-17 6:26 Jiapeng Chong
2023-02-17 8:48 ` Stanislaw Gruszka
0 siblings, 1 reply; 3+ messages in thread
From: Jiapeng Chong @ 2023-02-17 6:26 UTC (permalink / raw)
To: ogabbay; +Cc: osharabi, dri-devel, linux-kernel, Jiapeng Chong, Abaci Robot
These functions are not used outside the file device.c, so the
modification is defined as static.
drivers/accel/habanalabs/common/device.c:2641:6: warning: no previous prototype for ‘hl_capture_fw_err’.
drivers/accel/habanalabs/common/device.c:2619:6: warning: no previous prototype for ‘hl_capture_hw_err’.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4098
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
drivers/accel/habanalabs/common/device.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/accel/habanalabs/common/device.c b/drivers/accel/habanalabs/common/device.c
index fefe70bbbede..a5f5ee102823 100644
--- a/drivers/accel/habanalabs/common/device.c
+++ b/drivers/accel/habanalabs/common/device.c
@@ -2616,7 +2616,7 @@ void hl_handle_page_fault(struct hl_device *hdev, u64 addr, u16 eng_id, bool is_
*event_mask |= HL_NOTIFIER_EVENT_PAGE_FAULT;
}
-void hl_capture_hw_err(struct hl_device *hdev, u16 event_id)
+static void hl_capture_hw_err(struct hl_device *hdev, u16 event_id)
{
struct hw_err_info *info = &hdev->captured_err_info.hw_err;
@@ -2638,7 +2638,7 @@ void hl_handle_critical_hw_err(struct hl_device *hdev, u16 event_id, u64 *event_
*event_mask |= HL_NOTIFIER_EVENT_CRITICL_HW_ERR;
}
-void hl_capture_fw_err(struct hl_device *hdev, struct hl_info_fw_err_info *fw_info)
+static void hl_capture_fw_err(struct hl_device *hdev, struct hl_info_fw_err_info *fw_info)
{
struct fw_err_info *info = &hdev->captured_err_info.fw_err;
--
2.20.1.7.g153144c
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] habanalabs: make some functions static
2023-02-17 6:26 [PATCH] habanalabs: make some functions static Jiapeng Chong
@ 2023-02-17 8:48 ` Stanislaw Gruszka
2023-02-17 9:13 ` Stanislaw Gruszka
0 siblings, 1 reply; 3+ messages in thread
From: Stanislaw Gruszka @ 2023-02-17 8:48 UTC (permalink / raw)
To: Jiapeng Chong; +Cc: ogabbay, osharabi, Abaci Robot, linux-kernel, dri-devel
On Fri, Feb 17, 2023 at 02:26:26PM +0800, Jiapeng Chong wrote:
> These functions are not used outside the file device.c, so the
> modification is defined as static.
>
> drivers/accel/habanalabs/common/device.c:2641:6: warning: no previous prototype for ‘hl_capture_fw_err’.
> drivers/accel/habanalabs/common/device.c:2619:6: warning: no previous prototype for ‘hl_capture_hw_err’.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4098
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Regards
Stanislaw
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] habanalabs: make some functions static
2023-02-17 8:48 ` Stanislaw Gruszka
@ 2023-02-17 9:13 ` Stanislaw Gruszka
0 siblings, 0 replies; 3+ messages in thread
From: Stanislaw Gruszka @ 2023-02-17 9:13 UTC (permalink / raw)
To: Jiapeng Chong; +Cc: ogabbay, Abaci Robot, osharabi, dri-devel, linux-kernel
On Fri, Feb 17, 2023 at 09:48:14AM +0100, Stanislaw Gruszka wrote:
> On Fri, Feb 17, 2023 at 02:26:26PM +0800, Jiapeng Chong wrote:
> > These functions are not used outside the file device.c, so the
> > modification is defined as static.
> >
> > drivers/accel/habanalabs/common/device.c:2641:6: warning: no previous prototype for ‘hl_capture_fw_err’.
> > drivers/accel/habanalabs/common/device.c:2619:6: warning: no previous prototype for ‘hl_capture_hw_err’.
> >
> > Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> > Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4098
> > Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
>
> Regards
> Stanislaw
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-17 9:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-17 6:26 [PATCH] habanalabs: make some functions static Jiapeng Chong
2023-02-17 8:48 ` Stanislaw Gruszka
2023-02-17 9:13 ` Stanislaw Gruszka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox