Linux kernel staging patches
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Igor Putko <igorpetindev@gmail.com>
Cc: hansg@kernel.org, mchehab@kernel.org, gregkh@linuxfoundation.org,
	andy@kernel.org, sakari.ailus@linux.intel.com,
	linux-media@vger.kernel.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: media: atomisp: prefer __aligned over __attribute__((aligned))
Date: Thu, 18 Jun 2026 16:04:23 +0300	[thread overview]
Message-ID: <ajPs1w_hFDrsY43Q@ashevche-desk.local> (raw)
In-Reply-To: <ajPqQSudT9mS1e53@ashevche-desk.local>

On Thu, Jun 18, 2026 at 03:53:26PM +0300, Andy Shevchenko wrote:
> On Thu, Jun 18, 2026 at 03:09:51PM +0300, Igor Putko wrote:
> > 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.

...

> > --- a/drivers/staging/media/atomisp/pci/hive_isp_css_include/platform_support.h
> > +++ b/drivers/staging/media/atomisp/pci/hive_isp_css_include/platform_support.h
> 
> >  #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).

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.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-06-18 13:04 UTC|newest]

Thread overview: 4+ 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 [this message]
2026-06-18 15:12 ` [PATCH v2 0/3] staging: media: atomisp: remove dead platform_support.h header Igor Putko

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=ajPs1w_hFDrsY43Q@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --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@linux.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