From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Igor Putko <igorpetindev@gmail.com>
Cc: Hans de Goede <hansg@kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Sakari Ailus <sakari.ailus@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-media@vger.kernel.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] staging: media: atomisp: replace CSS_ALIGN() with standard __aligned
Date: Wed, 24 Jun 2026 15:00:25 +0300 [thread overview]
Message-ID: <ajvG2Yfq9a2hR_de@ashevche-desk.local> (raw)
In-Reply-To: <20260618151246.6678-2-igorpetindev@gmail.com>
On Thu, Jun 18, 2026 at 06:12:44PM +0300, Igor Putko wrote:
> 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.
...
> +++ b/drivers/staging/media/atomisp/pci/ia_css_acc_types.h
> #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>
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.
...
> 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_info {
> - CSS_ALIGN(u32 id, 8); /* IA_CSS_BINARY_ID_* */
> + u32 id __aligned(8); /* IA_CSS_BINARY_ID_* */
...
> 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);
> };
...
> 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;
...
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)...
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-06-24 12:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-18 12:09 [PATCH] staging: media: atomisp: prefer __aligned over __attribute__((aligned)) Igor Putko
2026-06-18 12:53 ` Andy Shevchenko
2026-06-18 13:04 ` Andy Shevchenko
2026-06-18 15:12 ` [PATCH v2 0/3] staging: media: atomisp: remove dead platform_support.h header Igor Putko
2026-06-18 15:12 ` [PATCH v2 1/3] staging: media: atomisp: replace CSS_ALIGN() with standard __aligned Igor Putko
2026-06-24 12:00 ` Andy Shevchenko [this message]
2026-06-18 15:12 ` [PATCH v2 2/3] staging: media: atomisp: drop unused platform_support.h inclusions Igor Putko
2026-06-24 12:03 ` Andy Shevchenko
2026-06-18 15:12 ` [PATCH v2 3/3] staging: media: atomisp: remove dead platform_support.h header file Igor Putko
2026-06-24 12:05 ` Andy Shevchenko
2026-06-24 12:06 ` [PATCH v2 0/3] staging: media: atomisp: remove dead platform_support.h header Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ajvG2Yfq9a2hR_de@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=hansg@kernel.org \
--cc=igorpetindev@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®