aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/staging/media/atomisp
AgeCommit message (Collapse)AuthorFilesLines
2026-07-15media: atomisp: Demote all broken kernel-doc commentsRicardo Ribalda49-189/+194
The atomisp code has been very heavily annotated in doxygen format. Unfortunately, both doxygen and kernel-doc use the same mark for signify the beginning of a comment (/**). As a result of this, kernel-doc gets confused when it parses atomisp and throws tons of warnings, which made us completely disable atomisp kernel-doc checks in Media-CI. Demote all the broken comments so we can have 100% coverage. Future patches can convert the doxygen annotations to kernel-doc if this is deemed useful. Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-05-20media: atomisp: use kmalloc_objs for array allocationsPedro Pontes1-27/+30
Convert manual kmalloc() multiplications to the modern kmalloc_objs() interface to improve type safety and prevent potential integer overflows. Signed-off-by: Pedro Pontes <pontescpedro@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20staging: media: atomisp: remove dead code in ov2722.hTaekyung Oh1-637/+0
Remove unused code blocks enclosed in #if 0 to clean up the code. Signed-off-by: Taekyung Oh <ohxorud@ohxorud.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20staging: media: atomisp: Fix block comment style in ov2722.hTaekyung Oh1-6/+6
Fix coding style warnings reported by checkpatch.pl. Move the comments above the corresponding code lines to align with guideline. Signed-off-by: Taekyung Oh <ohxorud@ohxorud.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20staging: media: atomisp: replace msleep() with fsleep() in atomisp-gc2235.cOskar Ray-Frayssinet1-1/+1
Replace msleep(5) with fsleep(5000) to avoid sleeping longer than necessary. msleep() with values less than 20ms may sleep for up to 20ms due to timer granularity. fsleep() selects the appropriate sleep function automatically. Signed-off-by: Oskar Ray-Frayssinet <rayfraytech@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20staging: media: atomisp: fix map and vmap leaks in stat buffer allocationHuihui Huang1-3/+12
There are memory leaks in drivers/staging/media/atomisp/pci/atomisp_compat_css20.c. In atomisp_css_allocate_stat_buffers(), s3a_map is allocated by ia_css_isp_3a_statistics_map_allocate() and its backing memory is mapped via hmm_vmap(). When dis_buf allocation fails, the error path frees s3a_data but does not unmap or free s3a_map. Similarly, when md_buf allocation fails, neither s3a_map nor dvs_map (and their hmm vmaps) are freed. Add the missing hmm_vunmap() and map free calls on both error paths, matching the cleanup order used in atomisp_css_free_3a_buffer() and atomisp_css_free_dis_buffer(). Signed-off-by: Huihui Huang <hhhuang@smu.edu.sg> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20media: atomisp: style fix for trailing statementsTimo Röhling1-3/+6
Fix checkpatch errors "ERROR: trailing statements should be on next line" in drivers/staging/media/atomisp/pci/sh_css_params.c. Signed-off-by: Timo Röhling <roehling@debian.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20staging: media: atomisp: fix indentation in bh host filesLiangCheng Wang2-18/+10
Fix inconsistent tab/space usage and bring function definitions into a single-line format, matching kernel coding style. Signed-off-by: LiangCheng Wang <zaq14760@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20staging: media: atomisp: use designated initializer in anr configLiangCheng Wang1-3/+3
Improve readability by using designated initializer for default_anr_config. Signed-off-by: LiangCheng Wang <zaq14760@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20staging: media: atomisp: fix indentation in anr filesLiangCheng Wang4-43/+24
Fix inconsistent tab/space usage and bring function definitions into a single-line format, matching kernel coding style. Signed-off-by: LiangCheng Wang <zaq14760@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20staging: media: atomisp: improve kernel-doc for ia_css_aa_configLiangCheng Wang1-3/+5
Move kernel-doc comment for strength field in ia_css_aa_config from inline to structure-level comment for better readability and tooling compatibility. Signed-off-by: LiangCheng Wang <zaq14760@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20staging: media: atomisp: Remove return from end of void function in gdc.cAdrian Barnaś1-1/+0
Fix checkpatch.pl warning on useless return on the end of the void function. Signed-off-by: Adrian Barnaś <abarnas@google.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20staging: media: atomisp: Whitespaces style cleanup in gdc.cAdrian Barnaś1-13/+8
Clean up coding style whitespace issues in drivers/staging/media/atomisp/pci/hive_isp_css_common/host/gdc.c. Fixes include: - removal of unnecessary line breaks - correcting spacing around operators - correcting spaces between types and names Signed-off-by: Adrian Barnaś <abarnas@google.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20media: atomisp: Use string choices helpersChelsy Ratnawat5-7/+12
Use string_choices.h helpers instead of hard-coded strings. Signed-off-by: Chelsy Ratnawat <chelsyratnawat2001@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20staging: media: atomisp: use array3_size() for overflow-safe allocationFeng Ning3-19/+31
Replace open-coded width * height * sizeof() multiplications with array3_size() to prevent integer overflow in buffer allocations. The atomisp driver computes DVS, morphing table, shading table and statistics buffer sizes using unchecked arithmetic. When dimensions are attacker-controlled or simply large, the product can silently wrap, causing kvmalloc() to allocate an undersized buffer. array3_size() saturates to SIZE_MAX on overflow, so kvmalloc() returns NULL instead of succeeding with too few bytes. Signed-off-by: Feng Ning <feng@innora.ai> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20staging: media: atomisp: use __func__ in debug message in atomisp_cmd.cOskar Ray-Frayssinet1-1/+1
Replace hardcoded function name string with __func__ macro in dev_dbg call as recommended by kernel coding style. Signed-off-by: Oskar Ray-Frayssinet <rayfraytech@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20staging: media: atomisp: remove unnecessary else after return in atomisp_cmd.cOskar Ray-Frayssinet1-2/+2
Remove unnecessary else clause after return statement as the else branch is not needed when the if branch always returns. Signed-off-by: Oskar Ray-Frayssinet <rayfraytech@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20staging: media: atomisp: use kmalloc_array() for sh_css_blob_infoLin YuChen1-3/+3
Replace the open-coded multiplication in kmalloc() with kmalloc_array() to provide overflow protection and improve code readability. Signed-off-by: Lin YuChen <starpt.official@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20staging: media: atomisp: hmm: remove unnecessary castsZile Xiong1-4/+2
Drop unnecessary casts when accessing vma->vm_private_data. No functional change. Signed-off-by: Zile Xiong <xiongzile99@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20media: atomisp: Drop unused includeAndy Shevchenko1-1/+0
This driver includes the legacy header <linux/gpio.h> but does not use any symbols from it. Drop the inclusion. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20staging: media: atomisp: reduce load_primary_binaries() stack usageArnd Bergmann1-3/+3
The load_primary_binaries() function is overly complex and has som large variables on the stack, which can cause warnings depending on CONFIG_FRAME_WARN setting: drivers/staging/media/atomisp/pci/sh_css.c: In function 'load_primary_binaries': drivers/staging/media/atomisp/pci/sh_css.c:5260:1: error: the frame size of 1560 bytes is larger than 1536 bytes [-Werror=frame-larger-than=] Half of the stack usage is for the prim_descr[] array, but only one member of the array is used at any given time. Reduce the stack usage by turning the array into a single structure. Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Cc: stable@vger.kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20staging: media: atomisp: improve cleanup robustness in ia_css_stream_destroy_isp2401()Jose A. Perez de Azpillaga1-14/+13
Remove the 'assert(entry)' call. In the atomisp driver, assert() is a wrapper around BUG(), which intentionally crashes the entire kernel. This is dangerous and inappropriate for a simple null pointer check during stream teardown. Replace it with a safe 'if (!entry) continue;' check. Change the early 'return' to a 'continue'. In a destruction path, it is better to proceed with cleaning up as many resources as possible rather than aborting early, which would result in memory leaks for the remaining pipes. Signed-off-by: Jose A. Perez de Azpillaga <azpijr@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20staging: media: atomisp: extract ISP2401 cleanup into helper functionJose A. Perez de Azpillaga1-43/+46
To reduce indentation and improve the readability of ia_css_stream_destroy(), extract the ISP2401-specific cleanup block into a new static helper function, ia_css_stream_destroy_isp2401(). Signed-off-by: Jose A. Perez de Azpillaga <azpijr@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20staging: media: atomisp: fix loop shadowing in ia_css_stream_destroy()Jose A. Perez de Azpillaga1-4/+4
The nested loop inside the IS_ISP2401 block incorrectly uses the same variable 'i' as the outer loop. This shadows the outer loop variable and causes premature termination or skipped array elements. Change the inner loop to use a new variable 'j' to prevent this. Fixes: 113401c67386 ("media: atomisp: sh_css: Removed #ifdef ISP2401 to make code generic") Signed-off-by: Jose A. Perez de Azpillaga <azpijr@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20staging: media: atomisp: use umin() for strscpy size argumentsMichael Ugrin1-7/+4
Replace open-coded ternary min expressions with umin() in strscpy() calls, as suggested by Dan Carpenter. Signed-off-by: Michael Ugrin <mugrinphoto@gmail.com> Reviewed-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20media: atomisp: avoid ACPI package count underflow in gmin_cfg_get_dsmMohamad El Harake1-1/+1
gmin_cfg_get_dsm() iterates over ACPI _DSM package elements as key/value pairs using obj->package.count - 1 as the loop bound. If package.count is 0, the subtraction underflows and may lead to out-of-bounds access. Use i + 1 < obj->package.count instead. Signed-off-by: Mohamad El Harake <mohamedharake2006@gmail.com> Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20media: atomisp: remove redundant call to ia_css_output0_configure()Jose A. Perez de Azpillaga1-3/+0
The function configure_isp_from_args() contained a duplicate call to ia_css_output0_configure() using the same output frame index. Remove the redundant call to simplify the configuration path. The ia_css_output0_configure() function acts as a configuration setter. It populates a struct ia_css_output0_configuration from the frame info and caches it in the binary parameters. Calling it twice with the same out_frame[0] pointer merely overwrites the exact same state with identical values. It has no cumulative state, neither does its order matter relative to ia_css_copy_output_configure(). ia_css_configure_output0() writes into binary->mem_params.params[], a software-side DMEM parameter buffer in kernel memory. The ISP firmware receives these parameters later as a batch, not at the time of the call. Calling a pure memory write twice with the same pointer and same value simply overwrites the same location with identical data, there is no hardware interaction that could require repetition. Signed-off-by: Jose A. Perez de Azpillaga <azpijr@gmail.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20media: atomisp: gate ref and tnr frame config behind ISP enable flagsJose A. Perez de Azpillaga1-19/+19
The FIXME comment noted that delay_frames can be NULL for certain pipeline configurations, without knowing why. The reason is that when a binary does not enable ref_frame, delay frame allocation is intentionally skipped to save memory, leaving the pointers NULL by design. The ISP feature flags in binary->info->sp.enable accurately reflect which features are active for a given binary. Using enable.ref_frame and enable.tnr as the predicate for their respective configuration steps ensures the configuration path stays in sync with what was actually built into the pipeline Signed-off-by: Jose A. Perez de Azpillaga <azpijr@gmail.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20staging: media: atomisp: pci: fix split GP_TIMER_BASE declarationAnushka Badhe1-2/+1
Merge declaration of const GP_TIMER_BASE split across 2 lines to improve readability. Signed-off-by: Anushka Badhe <anushkabadhe@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20staging: media: atomisp: replace uint32_t with u32Abinash Singh2-15/+15
Replace usage of uint32_t with u32 to comply with kernel coding style guidelines. Reported by checkpatch.pl. CHECK: Prefer kernel type 'u32' over 'uint32_t' Signed-off-by: Abinash Singh <abinashsinghlalotra@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20media: atomisp: gc2235: fix UAF and memory leakYuho Choi1-11/+18
gc2235_probe() handles its error paths incorrectly. If media_entity_pads_init() fails, gc2235_remove() is called, which tears down the subdev and frees dev, but then still falls through to atomisp_register_i2c_module(). This results in use-after-free. If atomisp_register_i2c_module() fails, the media entity and control handler are left initialized and dev is leaked. gc2235_remove() unconditionally calls media_entity_cleanup() and v4l2_ctrl_handler_free(), but these are not initialized at every error path in gc2235_probe(). Replace gc2235_remove() calls in the probe error paths with explicit unwind labels that free only the resources initialized at each point of failure, in reverse order of initialization. Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Signed-off-by: Yuho Choi <dbgh9129@gmail.com> Reviewed-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20media: atomisp: replace ia_css_region with v4l2_rectKarthikey Kadati3-83/+67
The struct ia_css_region definition is redundant as struct v4l2_rect provides the same functionality (left, top, width, height) and is the standard V4L2 type. Replace usage of ia_css_region with v4l2_rect in ia_css_dz_config and remove the definition of ia_css_region from ia_css_types.h. Also remove historical comments referencing the addition of zoom_region and include <linux/videodev2.h> to support the v4l2_rect type. Signed-off-by: Karthikey Kadati <karthikey3608@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20media: atomisp: Fix block comment coding style in sh_css_param_shading.cMahad Ibrahim1-6/+12
Fix checkpatch.pl warnings in sh_css_param_shading.c regarding block comment formatting. The warning was: - Block comments use a trailing */ on a separate line This change also moves text from the first line of block comments to subsequent lines to adhere to the standard Linux kernel coding style. Signed-off-by: Mahad Ibrahim <mahad.ibrahim.dev@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20media: atomisp: Convert comments to kernel-docMahad Ibrahim1-32/+27
Existing comments in mmu_public.h used Doxygen syntax and had inconsistent formatting. Convert the function documentation to the standard kernel-doc format to adhere to the Linux kernel coding style. Signed-off-by: Mahad Ibrahim <mahad.ibrahim.dev@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20media: atomisp: Fix erroneous parameter descriptionsMahad Ibrahim1-2/+0
The function mmu_get_page_table_base_index() accepts only one argument mmu_ID_t, the block comment for it shows an erroneous additional argument base_index[in]. Similarly, mmu_reg_load() only accepts two arguments, however the block comment explaining it shows an erroneous argument 'value[in]'. Remove incorrect documentation lines. Signed-off-by: Mahad Ibrahim <mahad.ibrahim.dev@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20media: atomisp: Fix block comment coding styleMahad Ibrahim1-34/+40
Fix checkpatch.pl warnings regarding block comments. Add missing asterisks to block comments to adhere to the kernel coding style. Signed-off-by: Mahad Ibrahim <mahad.ibrahim.dev@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20media: atomisp: Fix function signature alignmentMahad Ibrahim1-14/+5
Fix checkpatch.pl warnings regarding lines ending with "(" and improper spacing for indentation. This change fixes the function signatures for both function prototypes and static inline function definations in mmu_public.h. The kernel coding style prefers arguments to start immediately after the open parenthesis. Signed-off-by: Mahad Ibrahim <mahad.ibrahim.dev@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20media: atomisp: Remove redundant return statementMahad Ibrahim1-1/+0
The function mmu_reg_store() returns void. The final return statement is redundant as it is followed by the closing brace. Remove the redundant return statement to simplify code and adhere to kernel coding style. Signed-off-by: Mahad Ibrahim <mahad.ibrahim.dev@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20media: atomisp: Fix alloc_pages_bulk() failed errorsHans de Goede1-6/+15
Systems with the atomisp ISP do not have a lot of memory for modern standards, so these are often under memory pressure and alloc_pages_bulk() does not try very hard to free pages before returning an amount of pages which is less then requested. This leads to streaming from the camera often failing with a "alloc_pages_bulk() failed" error. vmalloc() also uses alloc_pages_bulk(), but falls back to allocating one page at a time when that fails. Do the same in alloc_private_pages() to avoid these errors. While at it also drop the weird custom GFP flags and just use GFP_KERNEL and drop the dev_err() as alloc_pages() already complaints loudly if it fails itself. Closes: https://github.com/jfwells/linux-asus-t100ta/issues/4 Signed-off-by: Hans de Goede <johannes.goede@oss.qualcomm.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20media: atomisp: Fix memory leak in atomisp_fixed_pattern_table()Zilin Guan1-4/+2
atomisp_v4l2_framebuffer_to_css_frame() allocates memory for temporary variable raw_black_frame, which must be released via ia_css_frame_free() before the function returns. However, if sh_css_set_black_frame() fails, the function returns immediately without performing this cleanup, leading to a memory leak. Fix this by assigning the return value of sh_css_set_black_frame() to ret. This ensures that the error code is propagated while allowing the execution to fall through to the ia_css_frame_free() cleanup call. The bug was originally detected on v6.13-rc1 using an experimental static analysis tool we are developing, and we have verified that the issue persists in the latest mainline kernel. The tool is based on the LLVM framework and is specifically designed to detect memory management issues. It is currently under active development and not yet publicly available. We performed build testing on x86_64 with allyesconfig. Since triggering this error path in atomisp requires specific Intel Atom ISP hardware and firmware, we were unable to perform runtime testing and instead verified the fix according to the code logic. Fixes: 85b606e02ad7 ("media: atomisp: get rid of a bunch of other wrappers") Signed-off-by: Zilin Guan <zilin@seu.edu.cn> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20staging: media: atomisp: fix block comment style in atomisp_cmd.cEthan Lam1-21/+39
Fix block comment style warnings reported by checkpatch.pl in atomisp_cmd.c. Signed-off-by: Ethan Lam <ethanlxkernel@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20media: staging: atomisp: Remove unnecessary return statement in void functionTomasz Unger1-1/+0
Remove redundant 'return;' at the end of void function ia_css_dvs_statistics_get(). Void functions do not need an explicit return statement at the end. No other occurrences in this file. Found with checkpatch.pl --strict. Signed-off-by: Tomasz Unger <tomasz.unger@yahoo.pl> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20staging: media: atomisp: Kill OP_std_modadd() macroAndy Shevchenko4-19/+5
The OP_std_modadd() adds no value, kill it and update the users to perform the necessary operations themselves. No intended functional changes. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Ethan Tidmore <ethantidmore06@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20staging: media: atomisp: Fix typos and formatting in headersHamdan Khan3-111/+120
Update block and inline comments to follow kernel commenting conventions, fix typos and wording, remove redundant comments and reformat long comments for clarity and line length consistency. Although some comments used the /** ... */ style, they are not kernel-doc comments and are converted to normal comment style. No functional changes are intended. Signed-off-by: Hamdan Khan <hamdankhan212@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20staging: media: atomisp: Fix braces on incorrect linesMatt Wardle7-58/+29
Fix checkpatch.pl errors: ERROR: that open brace { should be on the previous line Signed-off-by: Matt Wardle <matt@mattwardle.net> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20staging: media: atomisp: Fix function indentation and bracesMatt Wardle6-58/+52
Fix parameter indentation for functions and move opening braces onto new line. Fix checkpatch.pl errors: ERROR: open brace '{' following function definitions go on the next line Signed-off-by: Matt Wardle <matt@mattwardle.net> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20staging: media: atomisp: Remove braces for single statement blocksMatt Wardle23-93/+53
Fix checkpatch.pl warnings: WARNING: braces {} are not necessary for single statement blocks WARNING: braces {} are not necessary for any arm of this statement Signed-off-by: Matt Wardle <matt@mattwardle.net> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20staging: media: atomisp: replace sprintf() with strscpy()Tomasz Unger1-1/+1
Auditing calls to sprintf(). This code is fine because we are copying 9 characters into a 52 character buffer. But it would be cleaner to use strscpy() instead. Additionally, the 2-argument version of strscpy() checks at compile time that dst is an array, not just a pointer. This is the only sprintf() call in the whole driver. Signed-off-by: Tomasz Unger <tomasz.unger@yahoo.pl> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20staging: media: atomisp: Fix spelling mistakes in commentsTomasz Unger4-10/+10
Fix various spelling mistakes found by codespell: - aviod => avoid - corrent => correct - stablization => stabilization - addtional => additional - facor => factor - steams => streams Signed-off-by: Tomasz Unger <tomasz.unger@yahoo.pl> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-03-11staging: media: atomisp: Disallow all private IOCTLsSakari Ailus1-0/+4
Disallow all private IOCTLs. These aren't quite as safe as one could assume of IOCTL handlers; disable them for now. Instead of removing the code, return in the beginning of the function if cmd is non-zero in order to keep static checkers happy. Reported-by: Soufiane Dani <soufianeda@tutanota.com> Closes: https://lore.kernel.org/linux-staging/20260210-atomisp-fix-v1-1-024429cbff31@tutanota.com/ Cc: stable@vger.kernel.org Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Fixes: ad85094b293e ("Revert "media: staging: atomisp: Remove driver"") Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>