The Linux Kernel Mailing List
 help / color / mirror / Atom feed
  • * Re: [PATCH v3 0/3] iio: adc: xilinx-ams: refactor alarm handling to table-driven design
           [not found] <20260414224245.8493-1-guilherme.bozi@usp.br>
           [not found] ` <20260425163449.547b7ed9@jic23-huawei>
    @ 2026-05-12 14:18 ` Salih Erim
           [not found] ` <20260414224245.8493-2-guilherme.bozi@usp.br>
                       ` (2 subsequent siblings)
      4 siblings, 0 replies; 11+ messages in thread
    From: Salih Erim @ 2026-05-12 14:18 UTC (permalink / raw)
      To: Guilherme Ivo Bozi, Conall O'Griofa, Jonathan Cameron,
    	Michal Simek
      Cc: David Lechner, Nuno Sá, Andy Shevchenko, linux-iio,
    	linux-arm-kernel, linux-kernel
    
    Hi Guilherme,
    
    Thanks for working on this. The refactoring approach looks good overall,
    but all three patches have indentation issues and patch 3 has one
    semantic issue. Please see my comments on each patch.
    
    On 4/14/2026 11:40 PM, Guilherme Ivo Bozi wrote:
    > This series addresses significant code duplication in alarm handling
    > logic across the Xilinx AMS IIO driver.
    > 
    > To address this, the series introduces a centralized table-driven
    > mapping (alarm_map) that replaces multiple switch statements spread
    > across the driver.
    > 
    > This improves:
    > - maintainability (single source of truth for mappings)
    > - readability (removes repeated switch logic)
    > - extensibility (new alarms require only table updates)
    > 
    > No functional changes are intended.
    > 
    > Series overview:
    > - Patch 1: fix out-of-bounds channel lookup
    > - Patch 2: convert mutex handling to guard(mutex)
    > - Patch 3: introduce table-driven alarm mapping
    > 
    > v1 -> v2:
    > - Fixed Fixes tag format
    > - Replaced AMS_ALARM_INVALID with AMS_ALARM_NONE
    > - Changed alarm_map base_offset type
    > 
    > v2 -> v3:
    > - Replace 'i >= num_channels' with 'i == num_channels'
    > - Add missing trailing comma in alarm_map array initializer
    > 
    > Guilherme Ivo Bozi (3):
    >    iio: adc: xilinx-ams: fix out-of-bounds channel lookup in event
    >      handling
    >    iio: adc: xilinx-ams: use guard(mutex) for automatic locking
    >    iio: adc: xilinx-ams: refactor alarm mapping to table-driven approach
    > 
    >   drivers/iio/adc/xilinx-ams.c | 190 +++++++++++++----------------------
    >   1 file changed, 71 insertions(+), 119 deletions(-)
    > 
    > --
    > 2.47.3
    > 
    
    Salih
    
    
    ^ permalink raw reply	[flat|nested] 11+ messages in thread
  • [parent not found: <20260414224245.8493-2-guilherme.bozi@usp.br>]
  • [parent not found: <20260414224245.8493-3-guilherme.bozi@usp.br>]
  • [parent not found: <20260414224245.8493-4-guilherme.bozi@usp.br>]

  • end of thread, other threads:[~2026-05-12 18:05 UTC | newest]
    
    Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
    -- links below jump to the message on this page --
         [not found] <20260414224245.8493-1-guilherme.bozi@usp.br>
         [not found] ` <20260425163449.547b7ed9@jic23-huawei>
    2026-05-12 11:00   ` [PATCH v3 0/3] iio: adc: xilinx-ams: refactor alarm handling to table-driven design Guilherme Ivo Bozi
    2026-05-12 11:02     ` Michal Simek
    2026-05-12 11:26     ` Erim, Salih
    2026-05-12 14:18 ` Salih Erim
         [not found] ` <20260414224245.8493-2-guilherme.bozi@usp.br>
    2026-05-12 14:22   ` [PATCH v3 1/3] iio: adc: xilinx-ams: fix out-of-bounds channel lookup in event handling Salih Erim
    2026-05-12 15:40     ` Guilherme Ivo Bozi
    2026-05-12 15:54       ` Jonathan Cameron
    2026-05-12 18:05         ` Salih Erim
         [not found] ` <20260414224245.8493-3-guilherme.bozi@usp.br>
    2026-05-12 14:25   ` [PATCH v3 2/3] iio: adc: xilinx-ams: use guard(mutex) for automatic locking Salih Erim
         [not found] ` <20260414224245.8493-4-guilherme.bozi@usp.br>
    2026-05-12 14:34   ` [PATCH v3 3/3] iio: adc: xilinx-ams: refactor alarm mapping to table-driven approach Salih Erim
    2026-05-12 15:46     ` Guilherme Ivo Bozi
    

    This is a public inbox, see mirroring instructions
    for how to clone and mirror all data and code used for this inbox