staging: media: atomisp: prefer __aligned over __attribute__((aligned))
Subsystems (4)
PATCH 1/1 staging: media: atomisp: prefer __aligned over __attribute__((aligned))
Replace the GCC-specific __attribute__((aligned(a))) with the standard __aligned(a) macro to match the kernel coding style.
The checkpatch.pl error about complex macro values is a false positive here, as enclosing the macro expansion in parentheses breaks declaration syntax.
--- .../media/atomisp/pci/hive_isp_css_include/platform_support.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/atomisp/pci/hive_isp_css_include/platform_support.h +1 -1
@@ -20,6 +20,6 @@#define UINT32_MAX UINT_MAX#define UCHAR_MAX (255) -#define CSS_ALIGN (d, a) d __attribute__((aligned(a))) +#define CSS_ALIGN (d, a) d __aligned(a)#endif /* __PLATFORM_SUPPORT_H_INCLUDED__ */
Signature · 1 line
2.34.1
Quoted 6 lines · Igor Putko
Replace the GCC-specific __attribute__((aligned(a))) with the standard
__aligned(a)macro to match the kernel coding style.The checkpatch.pl error about complex macro values is a false positive here, as enclosing the macro expansion in parentheses breaks declaration syntax.
...
drivers/staging/media/atomisp/pci/hive_isp_css_include/platform_support.h line 23
Quoted 8 lines
drivers/staging/media/atomisp/pci/hive_isp_css_include/platform_support.h +1
-1#define UINT32_MAX UINT_MAX#define UCHAR_MAX (255) -#define CSS_ALIGN (d, a) d __attribute__((aligned(a))) +#define CSS_ALIGN (d, a) d __aligned(a)
Ah, nice finding! But this header should be killed. It means that rather kill the macro altogether and replace all occurrences with the proper attribute (see the history of math_support.h as an example).
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 7 lines · Andy Shevchenko
Quoted 6 lines · Igor Putko
Replace the GCC-specific __attribute__((aligned(a))) with the standard
__aligned(a)macro to match the kernel coding style.The checkpatch.pl error about complex macro values is a false positive here, as enclosing the macro expansion in parentheses breaks declaration syntax.
...
Quoted 6 lines
Quoted 6 lines
drivers/staging/media/atomisp/pci/hive_isp_css_include/platform_support.h +0
-0#define UINT32_MAX UINT_MAX#define UCHAR_MAX (255)
Quoted 6 lines
drivers/staging/media/atomisp/pci/hive_isp_css_include/platform_support.h line 23
Quoted 2 lines
drivers/staging/media/atomisp/pci/hive_isp_css_include/platform_support.h +1
-1-#define CSS_ALIGN (d, a) d __attribute__((aligned(a))) +#define CSS_ALIGN (d, a) d __aligned(a)Ah, nice finding! But this header should be killed. It means that rather kill the macro altogether and replace all occurrences with the proper attribute (see the history of
math_support.has an example).
For the record, I just have checked and in this entire header the only CSS_ALIGN() is used by the driver, the rest is already a dead code, so the plan is that:
- replace CSS_ALIGN() by respective __aligned() in the users
(be sure necessary headers are included, usually linux/types.h)
- drop *or* replace (if there are two categories, make two distinct changes) the platform_support.h inclusion in the following files
drivers/staging/media/atomisp/pci/base/circbuf/interface/ia_css_circbuf.h drivers/staging/media/atomisp/pci/base/circbuf/interface/ia_css_circbuf_desc.h drivers/staging/media/atomisp/pci/base/refcount/src/refcount.c drivers/staging/media/atomisp/pci/hive_isp_css_include/type_support.h drivers/staging/media/atomisp/pci/hive_isp_css_shared/host/tag.c drivers/staging/media/atomisp/pci/ia_css_acc_types.h drivers/staging/media/atomisp/pci/runtime/frame/interface/ia_css_frame_comm.h drivers/staging/media/atomisp/pci/runtime/inputfifo/src/inputfifo.c drivers/staging/media/atomisp/pci/runtime/isp_param/interface/ia_css_isp_param_types.h drivers/staging/media/atomisp/pci/runtime/isys/interface/ia_css_isys_comm.h drivers/staging/media/atomisp/pci/runtime/isys/src/csi_rx_rmgr.c drivers/staging/media/atomisp/pci/runtime/isys/src/ibuf_ctrl_rmgr.c drivers/staging/media/atomisp/pci/runtime/isys/src/isys_dma_rmgr.c drivers/staging/media/atomisp/pci/runtime/isys/src/isys_init.c drivers/staging/media/atomisp/pci/runtime/isys/src/isys_stream2mmio_rmgr.c drivers/staging/media/atomisp/pci/runtime/queue/interface/ia_css_queue.h drivers/staging/media/atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c drivers/staging/media/atomisp/pci/sh_css_firmware.c drivers/staging/media/atomisp/pci/sh_css_hrt.c drivers/staging/media/atomisp/pci/sh_css_internal.h drivers/staging/media/atomisp/pci/sh_css_param_shading.c drivers/staging/media/atomisp/pci/sh_css_params.c
- drop platform_support.h for good
So, I expect three *or* four patches in a series.
Signature · 2 lines
With Best Regards, Andy Shevchenko
v2 cover staging: media: atomisp: remove dead platform_support.h header
In reply to Igor PutkoHi Andy,
Following your feedback, this series replaces the custom CSS_ALIGN() macro with the standard __aligned attribute and completely removes the dead platform_support.h header file from the driver.
Igor Putko (3):
staging: media: atomisp: replace CSS_ALIGN() with standard __aligned
staging: media: atomisp: drop unused platform_support.h inclusions
staging: media: atomisp: remove dead platform_support.h header file
.../base/circbuf/interface/ia_css_circbuf.h | 1 - .../circbuf/interface/ia_css_circbuf_desc.h | 1 - .../atomisp/pci/base/refcount/src/refcount.c | 1 - .../hive_isp_css_include/platform_support.h | 25 ---------------- .../pci/hive_isp_css_include/type_support.h | 1 - .../pci/hive_isp_css_shared/host/tag.c | 1 - .../media/atomisp/pci/ia_css_acc_types.h | 30 +++++++++---------- .../frame/interface/ia_css_frame_comm.h | 1 - .../pci/runtime/inputfifo/src/inputfifo.c | 1 - .../interface/ia_css_isp_param_types.h | 11 +++---- .../runtime/isys/interface/ia_css_isys_comm.h | 1 - .../pci/runtime/isys/src/csi_rx_rmgr.c | 1 - .../pci/runtime/isys/src/ibuf_ctrl_rmgr.c | 1 - .../pci/runtime/isys/src/isys_dma_rmgr.c | 1 - .../atomisp/pci/runtime/isys/src/isys_init.c | 1 - .../runtime/isys/src/isys_stream2mmio_rmgr.c | 1 - .../runtime/queue/interface/ia_css_queue.h | 1 - .../atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c | 1 - .../media/atomisp/pci/sh_css_firmware.c | 1 - .../staging/media/atomisp/pci/sh_css_hrt.c | 1 - .../media/atomisp/pci/sh_css_internal.h | 4 +-- .../media/atomisp/pci/sh_css_param_shading.c | 1 - .../staging/media/atomisp/pci/sh_css_params.c | 1 - 23 files changed, 22 insertions(+), 67 deletions(-) delete mode 100644 drivers/staging/media/atomisp/pci/hive_isp_css_include/platform_support.h
Changes in v2:
- Remove platform_support.h instead of fixing the macro.
- Replace CSS_ALIGN with __aligned in all users.
- Drop unused includes from all affected files.
Signature · 1 line
2.34.1
PATCH v2 1/3 staging: media: atomisp: replace CSS_ALIGN() with standard __aligned
Replace the custom drivers/staging/media/atomisp-specific CSS_ALIGN() macro with the standard kernel __aligned() attribute. This aligns the driver with the kernel coding style and is a preparation for removing the entire custom platform_support.h header.
--- .../media/atomisp/pci/ia_css_acc_types.h | 30 +++++++++---------- .../interface/ia_css_isp_param_types.h | 11 +++---- .../media/atomisp/pci/sh_css_internal.h | 4 +-- 3 files changed, 22 insertions(+), 23 deletions(-)
drivers/staging/media/atomisp/pci/ia_css_acc_types.h +5 -5
@@ -13,9 +13,9 @@#include <system_local.h> /* HAS_IRQ_MAP_VERSION_# */ #include <type_support.h> -#include <platform_support.h> #include <debug_global.h> #include <linux/bits.h> +#include <linux/compiler.h> #include "ia_css_types.h" #include "ia_css_frame_format.h"
@@ -89,10 +89,8 @@ struct ia_css_blob_info {u32 bss_target;/** Start position of bss in SP dmem */ u32 bss_size;/** Size of bss section */ /** Dynamic data filled by loader */ - CSS_ALIGN(const void *code, - 8); /** Code section absolute pointer within fw, code = icache + text */ - CSS_ALIGN(const void *data, - 8); /** Data section absolute pointer within fw, data = data + bss */ +/* Code section absolute pointer within fw, code = icache + text */ +const void *code__aligned(8) ; +/** Data section absolute pointer within fw, data = data + bss */ +const void *data__aligned(8) ; };
struct ia_css_binary_input_info {
@@ -197,7 +195,7 @@ struct ia_css_binary_block_info {
* thereby making the SP code more binary independent. */
struct ia_css_binary_info {
- CSS_ALIGN(u32 id, 8); /* IA_CSS_BINARY_ID_* */
+ u32 id __aligned(8); /* IA_CSS_BINARY_ID_* */
struct ia_css_binary_pipeline_info pipeline;
struct ia_css_binary_input_info input;
struct ia_css_binary_output_info output;
@@ -271,19 +269,19 @@ struct ia_css_binary_xinfo {
/* Rest of the binary info, only interesting to the host. */
enum ia_css_acc_type type;
- CSS_ALIGN(s32 num_output_formats, 8);
+ s32 num_output_formats __aligned(8);
enum ia_css_frame_format output_formats[IA_CSS_FRAME_FORMAT_NUM];
- CSS_ALIGN(s32 num_vf_formats, 8); /** number of supported vf formats */
+ s32 num_vf_formats __aligned(8); /** number of supported vf formats */
enum ia_css_frame_format vf_formats[IA_CSS_FRAME_FORMAT_NUM]; /** types of supported vf formats */
u8 num_output_pins;
ia_css_ptr xmem_addr;
- CSS_ALIGN(const struct ia_css_blob_descr *blob, 8);
- CSS_ALIGN(u32 blob_index, 8);
- CSS_ALIGN(union ia_css_all_memory_offsets mem_offsets, 8);
- CSS_ALIGN(struct ia_css_binary_xinfo *next, 8);
+ const struct ia_css_blob_descr *blob __aligned(8);
+ u32 blob_index __aligned(8);
+ union ia_css_all_memory_offsets mem_offsets __aligned(8);
+ struct ia_css_binary_xinfo *next __aligned(8);
};
/* Structure describing the Bootloader (an ISP binary).
@@ -360,16 +358,16 @@ union ia_css_fw_union {
struct ia_css_fw_info {
size_t header_size; /** size of fw header */
- CSS_ALIGN(u32 type, 8);
+ u32 type __aligned(8);
union ia_css_fw_union info; /** Binary info */
struct ia_css_blob_info blob; /** Blob info */ /* Dynamic part */
struct ia_css_fw_info *next;
- CSS_ALIGN(u32 loaded, 8); /** Firmware has been loaded */
- CSS_ALIGN(const u8 *isp_code, 8); /** ISP pointer to code */
+ u32 loaded __aligned(8); /** Firmware has been loaded */
+ const u8 *isp_code __aligned(8); /** ISP pointer to code */
/** Firmware handle between user space and kernel */
- CSS_ALIGN(u32 handle, 8);
+ u32 handle __aligned(8);
/** Sections to copy from/to ISP */
struct ia_css_isp_param_css_segments mem_initializers; /** Initializer for local ISP memories */
drivers/staging/media/atomisp/pci/runtime/isp_param/interface/ia_css_isp_param_types.h +6 -5
@@ -8,8 +8,9 @@ Copyright (c) 2010 - 2015, Intel Corporation.#ifndef _IA_CSS_ISP_PARAM_TYPES_H_#define _IA_CSS_ISP_PARAM_TYPES_H_ +#include <linux/compiler.h> +#include "ia_css_types.h" -#include <platform_support.h> #include <system_global.h> /* Short hands */
@@ -62,12 +63,12 @@ struct ia_css_isp_param_memory_offsets {*/ union ia_css_all_memory_offsets {struct { - CSS_ALIGN(struct ia_css_memory_offsets *param, 8); - CSS_ALIGN(struct ia_css_config_memory_offsets *config, 8); - CSS_ALIGN(struct ia_css_state_memory_offsets *state, 8); +struct ia_css_memory_offsets *param__aligned(8) ; +struct ia_css_config_memory_offsets *config__aligned(8) ; +struct ia_css_state_memory_offsets *state__aligned(8) ; } offsets;struct { - CSS_ALIGN(void *ptr, 8); +void *ptr__aligned(8) ; } array[IA_CSS_NUM_PARAM_CLASSES ]; };
drivers/staging/media/atomisp/pci/sh_css_internal.h +2 -2
@@ -8,13 +8,13 @@#define _SH_CSS_INTERNAL_H_#include <linux/build_bug.h> +#include <linux/compiler.h> #include <linux/math.h> #include <linux/stdarg.h> #include <system_global.h> #include <math_support.h> #include <type_support.h> -#include <platform_support.h> #include "input_formatter.h" #include "input_system.h"
@@ -684,7 +684,7 @@ struct sh_css_hmm_buffer {* uint64_t does not exist on SP/ISP. * Size of the struct is checked by sp.hive.c. */ - CSS_ALIGN(u64 cookie_ptr, 8); /* TODO: check if this alignment is needed */ +u64 cookie_ptr__aligned(8) ;/* TODO: check if this alignment is needed */ u64 kernel_ptr;struct ia_css_time_meas timing_data;clock_value_t isys_eof_clock_tick;
Signature · 1 line
2.34.1
Re: [PATCH v2 1/3] staging: media: atomisp: replace CSS_ALIGN() with standard __aligned
Quoted 4 lines · Igor Putko
Replace the custom
drivers/staging/media/atomisp-specificCSS_ALIGN()macro with the standard kernel__aligned()attribute. This aligns the driver with the kernel coding style and is a preparation for removing the entire customplatform_support.hheader.
...
drivers/staging/media/atomisp/pci/ia_css_acc_types.h
Quoted 9 lines
+++
b/drivers/staging/media/atomisp/pci/ia_css_acc_types.h#include <
system_local.h> /* HAS_IRQ_MAP_VERSION_# */
#include <type_support.h>drivers/staging/media/atomisp/pci/ia_css_acc_types.h +1
-1-#include <platform_support.h> #include <debug_global.h> #include <linux/bits.h> +#include <linux/compiler.h>
While at it move the linux/*.h to be on top of the local ones. And group them.
<linux/*.h>
...blank line...
<local ones *.h>
Since there are a lot of uXX, just include types.h instead of compiler.h.
...
Quoted 14 lines
struct
ia_css_blob_info{drivers/staging/media/atomisp/pci/ia_css_acc_types.h +4
-4u32 bss_target;/** Start position of bss in SP dmem */ u32 bss_size;/** Size of bss section */ /** Dynamic data filled by loader */ - CSS_ALIGN(const void *code, - 8); /** Code section absolute pointer within fw, code = icache + text */ - CSS_ALIGN(const void *data, - 8); /** Data section absolute pointer within fw, data = data + bss */ +/* Code section absolute pointer within fw, code = icache + text */ +const void *code__aligned(8) ; +/** Data section absolute pointer within fw, data = data + bss */ +const void *data__aligned(8) ; };
...
Quoted 3 lines
struct
ia_css_binary_info{(quoted diff) +1
-1- CSS_ALIGN(u32 id, 8); /* IA_CSS_BINARY_ID_* */ + u32 id __aligned(8); /* IA_CSS_BINARY_ID_* */
...
Quoted 25 lines
struct
ia_css_binary_xinfo{(quoted diff) +6
-6/* Rest of the binary info, only interesting to the host. */ enum ia_css_acc_type type; - CSS_ALIGN(s32 num_output_formats, 8); + s32 num_output_formats __aligned(8); enum ia_css_frame_format output_formats[IA_CSS_FRAME_FORMAT_NUM]; - CSS_ALIGN(s32 num_vf_formats, 8); /** number of supported vf formats */ + s32 num_vf_formats __aligned(8); /** number of supported vf formats */ enum ia_css_frame_format vf_formats[IA_CSS_FRAME_FORMAT_NUM]; /** types of supported vf formats */ u8 num_output_pins; ia_css_ptr xmem_addr; - CSS_ALIGN(const struct ia_css_blob_descr *blob, 8); - CSS_ALIGN(u32 blob_index, 8); - CSS_ALIGN(union ia_css_all_memory_offsets mem_offsets, 8); - CSS_ALIGN(struct ia_css_binary_xinfo *next, 8); + const struct ia_css_blob_descr *blob __aligned(8); + u32 blob_index __aligned(8); + union ia_css_all_memory_offsets mem_offsets __aligned(8); + struct ia_css_binary_xinfo *next __aligned(8); };
...
Quoted 9 lines
struct
ia_css_fw_info{(quoted diff) +1
-1size_t header_size; /** size of fw header */ - CSS_ALIGN(u32 type, 8); + u32 type __aligned(8); union ia_css_fw_union info; /** Binary info */ struct ia_css_blob_info blob; /** Blob info */ /* Dynamic part */ struct ia_css_fw_info *next;
Review
Quoted 10 lines
(quoted diff) +3
-3- CSS_ALIGN(u32 loaded, 8); /** Firmware has been loaded */ - CSS_ALIGN(const u8 *isp_code, 8); /** ISP pointer to code */ + u32 loaded __aligned(8); /** Firmware has been loaded */ + const u8 *isp_code __aligned(8); /** ISP pointer to code */ /** Firmware handle between user space and kernel */ - CSS_ALIGN(u32 handle, 8); + u32 handle __aligned(8); /** Sections to copy from/to ISP */ struct ia_css_isp_param_css_segments mem_initializers;
...
Looking at the above, I think the best is to move the definition from platform_support.h to ia_css_acc_types.h. The rest what you changed seems fine with the explicit __aligned() attributes.
So, we can do it in two steps:
- replace in the other files first (as this patch does)
- move the definition to the ia_css_acc_types.h
- ...the rest of the series as is (I haven't reviewed those yet, though)...
Signature · 2 lines
With Best Regards, Andy Shevchenko
PATCH v2 2/3 staging: media: atomisp: drop unused platform_support.h inclusions
In reply to Igor PutkoDrop the unused inclusions of the platform_support.h header file across the driver. The header has become obsolete after replacing the custom CSS_ALIGN() macro with standard kernel attributes.
--- .../media/atomisp/pci/base/circbuf/interface/ia_css_circbuf.h | 1 - .../atomisp/pci/base/circbuf/interface/ia_css_circbuf_desc.h | 1 - drivers/staging/media/atomisp/pci/base/refcount/src/refcount.c | 1 - .../media/atomisp/pci/hive_isp_css_include/type_support.h | 1 - drivers/staging/media/atomisp/pci/hive_isp_css_shared/host/tag.c | 1 - .../atomisp/pci/runtime/frame/interface/ia_css_frame_comm.h | 1 - .../staging/media/atomisp/pci/runtime/inputfifo/src/inputfifo.c | 1 - .../media/atomisp/pci/runtime/isys/interface/ia_css_isys_comm.h | 1 - drivers/staging/media/atomisp/pci/runtime/isys/src/csi_rx_rmgr.c | 1 - .../staging/media/atomisp/pci/runtime/isys/src/ibuf_ctrl_rmgr.c | 1 - .../staging/media/atomisp/pci/runtime/isys/src/isys_dma_rmgr.c | 1 - drivers/staging/media/atomisp/pci/runtime/isys/src/isys_init.c | 1 - .../media/atomisp/pci/runtime/isys/src/isys_stream2mmio_rmgr.c | 1 - .../media/atomisp/pci/runtime/queue/interface/ia_css_queue.h | 1 - drivers/staging/media/atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c | 1 - drivers/staging/media/atomisp/pci/sh_css_firmware.c | 1 - drivers/staging/media/atomisp/pci/sh_css_hrt.c | 1 - drivers/staging/media/atomisp/pci/sh_css_param_shading.c | 1 - drivers/staging/media/atomisp/pci/sh_css_params.c | 1 - 19 files changed, 19 deletions(-)
drivers/staging/media/atomisp/pci/base/circbuf/interface/ia_css_circbuf.h +0 -1
@@ -11,7 +11,6 @@#include <type_support.h> #include <math_support.h> #include <assert_support.h> -#include <platform_support.h> #include "ia_css_circbuf_comm.h" #include "ia_css_circbuf_desc.h"
drivers/staging/media/atomisp/pci/base/circbuf/interface/ia_css_circbuf_desc.h +0 -1
@@ -9,7 +9,6 @@#include <type_support.h> #include <math_support.h> -#include <platform_support.h> #include <sp.h> #include "ia_css_circbuf_comm.h" /****************************************************************
drivers/staging/media/atomisp/pci/base/refcount/src/refcount.c +0 -1
@@ -9,7 +9,6 @@#include "ia_css_refcount.h" #include "sh_css_defs.h" -#include "platform_support.h" #include "assert_support.h"
drivers/staging/media/atomisp/pci/hive_isp_css_include/type_support.h +0 -1
@@ -12,7 +12,6 @@* Platform specific types. * * Per the DLI spec, types are in "type_support.h" and -* "platform_support.h" is for unclassified/to be refactored * platform specific definitions. */
drivers/staging/media/atomisp/pci/hive_isp_css_shared/host/tag.c +0 -1
@@ -5,7 +5,6 @@*/ #include "tag.h" -#include <platform_support.h> /* NULL */ #include <assert_support.h> #include "tag_local.h"
drivers/staging/media/atomisp/pci/runtime/frame/interface/ia_css_frame_comm.h +0 -1
@@ -8,7 +8,6 @@#define __IA_CSS_FRAME_COMM_H__#include "type_support.h" -#include "platform_support.h" #include "runtime/bufq/interface/ia_css_bufq_comm.h" #include <system_local.h> /* ia_css_ptr */
drivers/staging/media/atomisp/pci/runtime/inputfifo/src/inputfifo.c +0 -1
@@ -4,7 +4,6 @@* Copyright (c) 2010 - 2015, Intel Corporation. */ -#include "platform_support.h" #include "ia_css_inputfifo.h"
drivers/staging/media/atomisp/pci/runtime/isys/interface/ia_css_isys_comm.h +0 -1
@@ -10,7 +10,6 @@#include <type_support.h> #include <input_system.h> -#include <platform_support.h> /* inline */ #include <input_system_global.h> #include <ia_css_stream_public.h> /* IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH */
drivers/staging/media/atomisp/pci/runtime/isys/src/csi_rx_rmgr.c +0 -1
@@ -8,7 +8,6 @@#include "assert_support.h" -#include "platform_support.h" #include "ia_css_isys.h" #include "bitop_support.h" #include "ia_css_pipeline.h" /* ia_css_pipeline_get_pipe_io_status() */
drivers/staging/media/atomisp/pci/runtime/isys/src/ibuf_ctrl_rmgr.c +0 -1
@@ -7,7 +7,6 @@#include "system_global.h" #include "assert_support.h" -#include "platform_support.h" #include "ia_css_isys.h" #include "ibuf_ctrl_rmgr.h"
drivers/staging/media/atomisp/pci/runtime/isys/src/isys_dma_rmgr.c +0 -1
@@ -8,7 +8,6 @@#include "assert_support.h" -#include "platform_support.h" #include "ia_css_isys.h" #include "bitop_support.h" #include "isys_dma_rmgr.h"
drivers/staging/media/atomisp/pci/runtime/isys/src/isys_init.c +0 -1
@@ -7,7 +7,6 @@#include "input_system.h" #include "ia_css_isys.h" -#include "platform_support.h" #include "isys_dma_public.h" /* isys2401_dma_set_max_burst_size() */ #include "isys_irq.h"
drivers/staging/media/atomisp/pci/runtime/isys/src/isys_stream2mmio_rmgr.c +0 -1
@@ -8,7 +8,6 @@#include "assert_support.h" -#include "platform_support.h" #include "ia_css_isys.h" #include "bitop_support.h" #include "isys_stream2mmio_rmgr.h"
drivers/staging/media/atomisp/pci/runtime/queue/interface/ia_css_queue.h +0 -1
@@ -7,7 +7,6 @@#ifndef __IA_CSS_QUEUE_H#define __IA_CSS_QUEUE_H -#include <platform_support.h> #include <type_support.h> #include "ia_css_queue_comm.h"
drivers/staging/media/atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c +0 -1
@@ -9,7 +9,6 @@#include <type_support.h> #include <assert_support.h> -#include <platform_support.h> /* memset */ #include <ia_css_debug.h> /*
drivers/staging/media/atomisp/pci/sh_css_firmware.c +0 -1
@@ -11,7 +11,6 @@#include "hmm.h" #include <math_support.h> -#include "platform_support.h" #include "sh_css_firmware.h" #include "sh_css_defs.h"
drivers/staging/media/atomisp/pci/sh_css_hrt.c +0 -1
@@ -4,7 +4,6 @@* Copyright (c) 2015, Intel Corporation. */ -#include "platform_support.h" #include "sh_css_hrt.h" #include "ia_css_debug.h"
drivers/staging/media/atomisp/pci/sh_css_param_shading.c +0 -1
@@ -18,7 +18,6 @@#include "sh_css_hrt.h" -#include "platform_support.h" /* Bilinear interpolation on shading tables: * For each target point T, we calculate the 4 surrounding source points:
drivers/staging/media/atomisp/pci/sh_css_params.c +0 -1
@@ -21,7 +21,6 @@#include "ia_css_queue.h" #include "sw_event_global.h" /* Event IDs */ -#include "platform_support.h" #include "assert_support.h" #include "ia_css_stream.h"
Signature · 1 line
2.34.1
Re: [PATCH v2 2/3] staging: media: atomisp: drop unused platform_support.h inclusions
Quoted 3 lines · Igor Putko
Drop the unused inclusions of the
platform_support.hheader file across the driver. The header has become obsolete after replacing the customCSS_ALIGN()macro with standard kernel attributes.
But in the above list there are no users even with the platform_support.h in place, right? I mean that this patch can be, for example, applied first without any regression. Correct? If so, make it the first in the series, it helps a lot to understand the changes in the (currently) first patch.
Quoted 3 lines
Suggested-by Andy Shevchenko <[email protected]>Signed-off-by Igor Putko <[email protected]>---
Code wise looks very good to me, thanks!
Signature · 2 lines
With Best Regards, Andy Shevchenko
PATCH v2 3/3 staging: media: atomisp: remove dead platform_support.h header file
In reply to Igor PutkoRemove the platform_support.h header file completely as it is no longer used anywhere in the driver and its contents are obsolete.
--- .../hive_isp_css_include/platform_support.h | 25 ------------------- 1 file changed, 25 deletions(-) delete mode 100644 drivers/staging/media/atomisp/pci/hive_isp_css_include/platform_support.h
drivers/staging/media/atomisp/pci/hive_isp_css_include/platform_support.h deleted +0 -25
@@ -1,25 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* -* Support for Intel Camera Imaging ISP subsystem. -* Copyright (c) 2015, Intel Corporation. -*/ - -#ifndef __PLATFORM_SUPPORT_H_INCLUDED__ -#define __PLATFORM_SUPPORT_H_INCLUDED__ - -/** -* @file -* Platform specific includes and functionality. -*/ - -#include <linux/delay.h> -#include <linux/kernel.h> -#include <linux/string.h> - -#define UINT16_MAX USHRT_MAX -#define UINT32_MAX UINT_MAX -#define UCHAR_MAX (255) - -#define CSS_ALIGN (d, a) d __attribute__((aligned(a))) - -#endif /* __PLATFORM_SUPPORT_H_INCLUDED__ */
Signature · 1 line
2.34.1
Re: [PATCH v2 3/3] staging: media: atomisp: remove dead platform_support.h header file
Quoted 2 lines · Igor Putko
Remove the
platform_support.hheader file completely as it is no longer used anywhere in the driver and its contents are obsolete.
Right.
...
Quoted 1 line
-#define
CSS_ALIGN(d, a)d __attribute__((aligned(a)))
...assuming this macro will be still alive in the only one header.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Re: [PATCH v2 0/3] staging: media: atomisp: remove dead platform_support.h header
In reply to Igor PutkoQuoted 4 lines · Igor Putko
Following your feedback, this series replaces the custom
CSS_ALIGN()macro with the standard__alignedattribute and completely removes the deadplatform_support.hheader file from the driver.
Thank you much for doing this! I have given a few comments, I think the v3 will be final if you address them. Expecting a v3 with 4 patches.
Signature · 2 lines
With Best Regards, Andy Shevchenko