staging: media: atomisp: Removed unnecessary parentheses.
Subsystems (4)
PATCH 1/9 staging: media: atomisp: Removed unnecessary parentheses.
In reply to a message not in the archiveRemoved parentheses on the right hand side of assignment, as they are not required. The following coccinelle script is used to fix this issue:
@@
binary operator op = {<<,>>,+,/};
local idexpression id;
expression e1, e2;
@@
id =
-(
e1 op e2
-)
--- drivers/staging/media/atomisp/i2c/gc0310.c | 4 ++-- drivers/staging/media/atomisp/i2c/gc2235.c | 4 ++-- drivers/staging/media/atomisp/i2c/ov2680.c | 4 ++-- drivers/staging/media/atomisp/i2c/ov2722.c | 4 ++-- drivers/staging/media/atomisp/i2c/ov5693/ov5693.c | 2 +- drivers/staging/media/atomisp/i2c/ov8858.c | 2 +- .../css2400/isp/kernels/bnlm/ia_css_bnlm.host.c | 2 +- .../isp/kernels/macc/macc1_5/ia_css_macc1_5.host.c | 2 +- .../css2400/isp/kernels/s3a/s3a_1.0/ia_css_s3a.host.c | 2 +- .../media/atomisp/pci/atomisp2/css2400/sh_css_mipi.c | 18 +++++++++--------- 10 files changed, 22 insertions(+), 22 deletions(-)
drivers/staging/media/atomisp/i2c/gc0310.c +2 -2
@@ -904,13 +904,13 @@ static int gc0310_s_power(struct v4l2_subdev *sd, int on)#define LARGEST_ALLOWED_RATIO_MISMATCH 800static int distance (struct gc0310_resolution *res,u32 w,u32 h) { -unsigned int w_ratio = ((res->width <<13 )/w); +unsigned int w_ratio = (res->width <<13 )/w;unsigned int h_ratio;int match;if (h ==0 )return -1 ; - h_ratio = ((res->height <<13 ) / h); + h_ratio = (res->height <<13 ) / h;if (h_ratio ==0 )return -1 ; match =abs (((w_ratio <<13 ) / h_ratio) - ((int )8192 ));
drivers/staging/media/atomisp/i2c/gc2235.c +2 -2
@@ -697,13 +697,13 @@ static int gc2235_s_power(struct v4l2_subdev *sd, int on)#define LARGEST_ALLOWED_RATIO_MISMATCH 800static int distance (struct gc2235_resolution *res,u32 w,u32 h) { -unsigned int w_ratio = ((res->width <<13 )/w); +unsigned int w_ratio = (res->width <<13 )/w;unsigned int h_ratio;int match;if (h ==0 )return -1 ; - h_ratio = ((res->height <<13 ) / h); + h_ratio = (res->height <<13 ) / h;if (h_ratio ==0 )return -1 ; match =abs (((w_ratio <<13 ) / h_ratio) - ((int )8192 ));
drivers/staging/media/atomisp/i2c/ov2680.c +2 -2
@@ -1005,13 +1005,13 @@ static int ov2680_s_power(struct v4l2_subdev *sd, int on)#define LARGEST_ALLOWED_RATIO_MISMATCH 600static int distance (struct ov2680_resolution *res,u32 w,u32 h) { -unsigned int w_ratio = ((res->width <<13 )/w); +unsigned int w_ratio = (res->width <<13 )/w;unsigned int h_ratio;int match;if (h ==0 )return -1 ; - h_ratio = ((res->height <<13 ) / h); + h_ratio = (res->height <<13 ) / h;if (h_ratio ==0 )return -1 ; match =abs (((w_ratio <<13 ) / h_ratio) - ((int )8192 ));
drivers/staging/media/atomisp/i2c/ov2722.c +2 -2
@@ -801,13 +801,13 @@ static int ov2722_s_power(struct v4l2_subdev *sd, int on)#define LARGEST_ALLOWED_RATIO_MISMATCH 800static int distance (struct ov2722_resolution *res,u32 w,u32 h) { -unsigned int w_ratio = ((res->width <<13 )/w); +unsigned int w_ratio = (res->width <<13 )/w;unsigned int h_ratio;int match;if (h ==0 )return -1 ; - h_ratio = ((res->height <<13 ) / h); + h_ratio = (res->height <<13 ) / h;if (h_ratio ==0 )return -1 ; match =abs (((w_ratio <<13 ) / h_ratio) - ((int )8192 ));
drivers/staging/media/atomisp/i2c/ov5693/ov5693.c +1 -1
@@ -1506,7 +1506,7 @@ static int distance(struct ov5693_resolution *res, u32 w, u32 h) res->width < w || res->height < h)return -1 ; - ratio = (res->width <<13 ); + ratio = res->width <<13 ; ratio /= w; ratio *= h; ratio /= res->height;
drivers/staging/media/atomisp/i2c/ov8858.c +1 -1
@@ -1250,7 +1250,7 @@ static int distance(struct ov8858_resolution const *res, const u32 w, res->width < w || res->height < h)return -1 ; - ratio = (res->width <<13 ); + ratio = res->width <<13 ; ratio /= w; ratio *= h; ratio /= res->height;
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bnlm/ia_css_bnlm.host.c +1 -1
@@ -45,7 +45,7 @@ bnlm_lut_encode(struct bnlm_lut *lut, const int32_t *lut_thr, const int32_t *lut {uint32_t blk, i;const uint32_t block_size =16 ; -const uint32_t total_blocks = (ISP_VEC_NELEMS / block_size); +const uint32_t total_blocks =ISP_VEC_NELEMS / block_size;/* Create VMEM LUTs from the threshold and value arrays. *
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/macc/macc1_5/ia_css_macc1_5.host.c +1 -1
@@ -50,7 +50,7 @@ ia_css_macc1_5_vmem_encode(for (k =0 ; k <4 ; k++)for (i =0 ; i <IA_CSS_MACC_NUM_AXES ; i++) { - idx = (idx_map[i] + (k*IA_CSS_MACC_NUM_AXES )); + idx = idx_map[i] + (k*IA_CSS_MACC_NUM_AXES ); j =4 *i; params->data[0 ][(idx)] = from->data[j];
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/s3a/s3a_1.0/ia_css_s3a.host.c +1 -1
@@ -350,7 +350,7 @@ ia_css_s3a_vmem_decode( hi = isp_stats_hi; lo = isp_stats_lo; - chunk = (ISP_VEC_NELEMS >> host_stats->grid.deci_factor_log2); + chunk =ISP_VEC_NELEMS >> host_stats->grid.deci_factor_log2; chunk =max (chunk,1 );for (y =0 ; y < out_height; y++) {
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_mipi.c +9 -9
@@ -210,18 +210,18 @@ ia_css_mipi_frame_calculate_size(const unsigned int width,*/ - words_per_odd_line = ((odd_line_bytes +3 ) >>2 );/* ceil(odd_line_bytes/4); word = 4 bytes */ - words_per_even_line = ((even_line_bytes +3 ) >>2 ); + words_per_odd_line = (odd_line_bytes +3 ) >>2 ;/* ceil(odd_line_bytes/4); word = 4 bytes */ + words_per_even_line = (even_line_bytes +3 ) >>2 ; words_for_first_line = words_per_odd_line +2 + (hasSOLandEOL ?1 :0 );/* + SOF +packet header + optionally (SOL), but (EOL) is not in the first line */ words_per_odd_line += (1 + (hasSOLandEOL ?2 :0 ));/* each non-first line has format header, and optionally (SOL) and (EOL). */ words_per_even_line += (1 + (hasSOLandEOL ?2 :0 )); - mem_words_per_odd_line = ((words_per_odd_line +7 ) >>3 ); + mem_words_per_odd_line = (words_per_odd_line +7 ) >>3 ;/* ceil(words_per_odd_line/8); mem_word = 32 bytes, 8 words */ - mem_words_for_first_line = ((words_for_first_line +7 ) >>3 ); - mem_words_per_even_line = ((words_per_even_line +7 ) >>3 ); + mem_words_for_first_line = (words_for_first_line +7 ) >>3 ; + mem_words_per_even_line = (words_per_even_line +7 ) >>3 ; mem_words_for_EOF =1 ;/* last line consisit of the optional (EOL) and EOF */ mem_words = ((embedded_data_size_words + 7) >> 3) +
@@ -364,13 +364,13 @@ calculate_mipi_buff_size( even_line_bytes = odd_line_bytes; } - words_per_odd_line = ((odd_line_bytes +3 ) >>2 ); + words_per_odd_line = (odd_line_bytes +3 ) >>2 ;/* ceil(odd_line_bytes/4); word = 4 bytes */ - words_per_even_line = ((even_line_bytes +3 ) >>2 ); + words_per_even_line = (even_line_bytes +3 ) >>2 ; - mem_words_per_odd_line = ((words_per_odd_line +7 ) >>3 ); + mem_words_per_odd_line = (words_per_odd_line +7 ) >>3 ;/* ceil(words_per_odd_line/8); mem_word = 32 bytes, 8 words */ - mem_words_per_even_line = ((words_per_even_line +7 ) >>3 ); + mem_words_per_even_line = (words_per_even_line +7 ) >>3 ; mem_words_per_buff_line = (mem_words_per_odd_line > mem_words_per_even_line) ? mem_words_per_odd_line : mem_words_per_even_line;
Signature · 1 line
2.9.3
PATCH 2/9 staging: media: atomisp: Fix line over 80 characters.
In reply to a message not in the archiveLine over 80 characters are split to fix the following checkpatch issue:
WARNING: line over 80 characters
--- drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_mipi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_mipi.c +2 -1
@@ -210,7 +210,8 @@ ia_css_mipi_frame_calculate_size(const unsigned int width,*/ - words_per_odd_line = (odd_line_bytes +3 ) >>2 ;/* ceil(odd_line_bytes/4); word = 4 bytes */ + words_per_odd_line = (odd_line_bytes +3 ) >>2 ; +/* ceil(odd_line_bytes/4); word = 4 bytes */ words_per_even_line = (even_line_bytes +3 ) >>2 ; words_for_first_line = words_per_odd_line +2 + (hasSOLandEOL ?1 :0 );/* + SOF +packet header + optionally (SOL), but (EOL) is not in the first line */
Signature · 1 line
2.9.3
PATCH 3/9 staging: media: atomisp: Added spaces around arithmetic and bitwise operators.
In reply to a message not in the archiveAdded spaces around arithmetic operators (/, *, +) and bitwise operators (<<, >>), to fix the checkpatch issue.
--- drivers/staging/media/atomisp/i2c/gc0310.c | 2 +- drivers/staging/media/atomisp/i2c/gc2235.c | 4 ++-- drivers/staging/media/atomisp/i2c/ov2680.c | 6 +++--- drivers/staging/media/atomisp/i2c/ov2722.c | 6 +++--- .../css2400/isp/kernels/macc/macc1_5/ia_css_macc1_5.host.c | 10 +++++----- 5 files changed, 14 insertions(+), 14 deletions(-)
drivers/staging/media/atomisp/i2c/gc0310.c +1 -1
@@ -904,7 +904,7 @@ static int gc0310_s_power(struct v4l2_subdev *sd, int on)#define LARGEST_ALLOWED_RATIO_MISMATCH 800static int distance (struct gc0310_resolution *res,u32 w,u32 h) { -unsigned int w_ratio = (res->width <<13 )/w; +unsigned int w_ratio = (res->width <<13 ) / w;unsigned int h_ratio;int match;
drivers/staging/media/atomisp/i2c/gc2235.c +2 -2
@@ -359,7 +359,7 @@ static long __gc2235_set_exposure(struct v4l2_subdev *sd, int coarse_itg,u16 coarse_integration = (u16 )coarse_itg;int ret =0 ;u16 expo_coarse_h, expo_coarse_l, gain_val =0xF0 , gain_val2 =0xF0 ; - expo_coarse_h = coarse_integration>>8 ; + expo_coarse_h = coarse_integration >>8 ; expo_coarse_l = coarse_integration &0xff ; ret = gc2235_write_reg(client, GC2235_8BIT,
@@ -697,7 +697,7 @@ static int gc2235_s_power(struct v4l2_subdev *sd, int on)#define LARGEST_ALLOWED_RATIO_MISMATCH 800static int distance (struct gc2235_resolution *res,u32 w,u32 h) { -unsigned int w_ratio = (res->width <<13 )/w; +unsigned int w_ratio = (res->width <<13 ) / w;unsigned int h_ratio;int match;
drivers/staging/media/atomisp/i2c/ov2680.c +3 -3
@@ -389,9 +389,9 @@ static int ov2680_get_intg_factor(struct i2c_client *client, buf->output_height = reg_val; buf->binning_factor_x = res->bin_factor_x ? - (res->bin_factor_x*2 ) :1 ; + (res->bin_factor_x *2 ) :1 ; buf->binning_factor_y = res->bin_factor_y ? - (res->bin_factor_y*2 ) :1 ; + (res->bin_factor_y *2 ) :1 ;return 0 ; }
@@ -1005,7 +1005,7 @@ static int ov2680_s_power(struct v4l2_subdev *sd, int on)#define LARGEST_ALLOWED_RATIO_MISMATCH 600static int distance (struct ov2680_resolution *res,u32 w,u32 h) { -unsigned int w_ratio = (res->width <<13 )/w; +unsigned int w_ratio = (res->width <<13 ) / w;unsigned int h_ratio;int match;
drivers/staging/media/atomisp/i2c/ov2722.c +3 -3
@@ -328,7 +328,7 @@ static int ov2722_get_intg_factor(struct i2c_client *client, pll_multiplier = pll_multiplier &0x7f ; op_pix_clk_div = op_pix_clk_div &0x03 ; pix_clk_freq_hz = ext_clk_freq_hz / pre_pll_clk_div * pll_multiplier - * op_pix_clk_div/pll_invariant_div; + * op_pix_clk_div / pll_invariant_div; dev->vt_pix_clk_freq_mhz = pix_clk_freq_hz; buf->vt_pix_clk_freq_mhz = pix_clk_freq_hz;
@@ -801,7 +801,7 @@ static int ov2722_s_power(struct v4l2_subdev *sd, int on)#define LARGEST_ALLOWED_RATIO_MISMATCH 800static int distance (struct ov2722_resolution *res,u32 w,u32 h) { -unsigned int w_ratio = (res->width <<13 )/w; +unsigned int w_ratio = (res->width <<13 ) / w;unsigned int h_ratio;int match;
@@ -933,7 +933,7 @@ static int ov2722_set_fmt(struct v4l2_subdev *sd,for (i =0 ; i <OV2722_POWER_UP_RETRY_NUM ; i++) {dev_err (&client->dev,"ov2722 retry to power up %d/%d times, result: " , - i+1 ,OV2722_POWER_UP_RETRY_NUM ); + i +1 ,OV2722_POWER_UP_RETRY_NUM );power_down (sd); ret =power_up (sd);if (ret) {
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/macc/macc1_5/ia_css_macc1_5.host.c +5 -5
@@ -50,13 +50,13 @@ ia_css_macc1_5_vmem_encode(for (k =0 ; k <4 ; k++)for (i =0 ; i <IA_CSS_MACC_NUM_AXES ; i++) { - idx = idx_map[i] + (k*IA_CSS_MACC_NUM_AXES ); - j =4 *i; + idx = idx_map[i] + (k *IA_CSS_MACC_NUM_AXES ); + j =4 * i; params->data[0 ][(idx)] = from->data[j]; - params->data[1 ][(idx)] = from->data[j+1 ]; - params->data[2 ][(idx)] = from->data[j+2 ]; - params->data[3 ][(idx)] = from->data[j+3 ]; + params->data[1 ][(idx)] = from->data[j +1 ]; + params->data[2 ][(idx)] = from->data[j +2 ]; + params->data[3 ][(idx)] = from->data[j +3 ]; } }
Signature · 1 line
2.9.3
PATCH 4/9 staging: media: atomisp: Replace 'uint32_t' with kernel type u32.
In reply to a message not in the archiveReplaced 'uint32_t' with kernel type u32, to fix the checkpatch issue.
--- .../pci/atomisp2/css2400/isp/kernels/bnlm/ia_css_bnlm.host.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bnlm/ia_css_bnlm.host.c +4 -4
@@ -43,9 +43,9 @@ static const int32_t div_lut_intercepts[BNLM_DIV_LUT_SIZE] = {static inline void bnlm_lut_encode (struct bnlm_lut *lut,const int32_t *lut_thr,const int32_t *lut_val,const uint32_t lut_size) { -uint32_t blk, i; -const uint32_t block_size =16 ; -const uint32_t total_blocks =ISP_VEC_NELEMS / block_size; +u32 blk, i; +const u32 block_size =16 ; +const u32 total_blocks =ISP_VEC_NELEMS / block_size;/* Create VMEM LUTs from the threshold and value arrays. *
@@ -79,7 +79,7 @@ bnlm_lut_encode(struct bnlm_lut *lut, const int32_t *lut_thr, const int32_t *lut/* Copy data from first block to all blocks */ for (blk =1 ; blk < total_blocks; blk++) { -uint32_t blk_offset = blk * block_size; +u32 blk_offset = blk * block_size;for (i =1 ; i < lut_size; i++) { lut->thr[0 ][blk_offset + i] = lut->thr[0 ][i]; lut->val[0 ][blk_offset + i] = lut->val[0 ][i];
Signature · 1 line
2.9.3
PATCH 5/9 staging: media: atomisp: Fix block comments warning.
In reply to a message not in the archiveUsed kernel preferred block commenting style, to fix the following checkpatch issue:
WARNING: Block comments use a trailing */ on a separate line
--- drivers/staging/media/atomisp/i2c/gc0310.c | 3 ++- drivers/staging/media/atomisp/i2c/gc2235.c | 3 ++- drivers/staging/media/atomisp/i2c/ov2680.c | 7 ++++--- drivers/staging/media/atomisp/i2c/ov2722.c | 6 ++++-- .../pci/atomisp2/css2400/isp/kernels/bnlm/ia_css_bnlm.host.c | 6 +++--- 5 files changed, 15 insertions(+), 10 deletions(-)
drivers/staging/media/atomisp/i2c/gc0310.c +2 -1
@@ -538,7 +538,8 @@ static long gc0310_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg) }/* This returns the exposure time being used. This should only be used -for filling in EXIF data, not for actual image processing. */ +* for filling in EXIF data, not for actual image processing. +*/ static int gc0310_q_exposure (struct v4l2_subdev *sd,s32 *value) {struct i2c_client *client =v4l2_get_subdevdata (sd);
drivers/staging/media/atomisp/i2c/gc2235.c +2 -1
@@ -427,7 +427,8 @@ static long gc2235_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)return 0 ; }/* This returns the exposure time being used. This should only be used -for filling in EXIF data, not for actual image processing. */ +* for filling in EXIF data, not for actual image processing. +*/ static int gc2235_q_exposure (struct v4l2_subdev *sd,s32 *value) {struct i2c_client *client =v4l2_get_subdevdata (sd);
drivers/staging/media/atomisp/i2c/ov2680.c +4 -3
@@ -554,7 +554,8 @@ static long ov2680_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg) }/* This returns the exposure time being used. This should only be used -for filling in EXIF data, not for actual image processing. */ +* for filling in EXIF data, not for actual image processing. +*/ static int ov2680_q_exposure (struct v4l2_subdev *sd,s32 *value) {struct i2c_client *client =v4l2_get_subdevdata (sd);
@@ -1135,8 +1136,8 @@ static int ov2680_set_fmt(struct v4l2_subdev *sd,v4l2_info (client,"\n%s idx %d \n" , __func__, dev->fmt_idx);/*ret = startup(sd); -if (ret) -dev_err(&client->dev, "ov2680 startup err\n"); +* if (ret) +* dev_err(&client->dev, "ov2680 startup err\n"); */ err:mutex_unlock (&dev->input_lock);
drivers/staging/media/atomisp/i2c/ov2722.c +4 -2
@@ -505,7 +505,8 @@ static long ov2722_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg) }/* This returns the exposure time being used. This should only be used -for filling in EXIF data, not for actual image processing. */ +* for filling in EXIF data, not for actual image processing. +*/ static int ov2722_q_exposure (struct v4l2_subdev *sd,s32 *value) {struct i2c_client *client =v4l2_get_subdevdata (sd);
@@ -687,7 +688,8 @@ static int gpio_ctrl(struct v4l2_subdev *sd, bool flag)return dev->platform_data->gpio_ctrl (sd, flag);/* Note: the GPIO order is asymmetric: always RESET# -* before PWDN# when turning it on or off. */ +* before PWDN# when turning it on or off. +*/ ret = dev->platform_data->gpio0_ctrl (sd, flag);/* *ov2722 PWDN# active high when pull down,opposite to the convention
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bnlm/ia_css_bnlm.host.c +3 -3
@@ -39,7 +39,7 @@ static const int32_t div_lut_intercepts[BNLM_DIV_LUT_SIZE] = {* lut_thr : array containing threshold values for lut * lut_val : array containing output values related to lut_thr * lut_size: Size of lut_val array -* */ +*/ static inline void bnlm_lut_encode (struct bnlm_lut *lut,const int32_t *lut_thr,const int32_t *lut_val,const uint32_t lut_size) {
@@ -56,7 +56,7 @@ bnlm_lut_encode(struct bnlm_lut *lut, const int32_t *lut_thr, const int32_t *lut* Then these elements are copied into other groups inside the same * vector. If the LUT size is less than 16, then remaining elements are * set to 0. -* */ +*/ assert ((lut_size >=2 ) && (lut_size <= block_size));/* array lut_thr has (lut_size-1) entries */ for (i =0 ; i < lut_size-2 ; i++) {
@@ -90,7 +90,7 @@ bnlm_lut_encode(struct bnlm_lut *lut, const int32_t *lut_thr, const int32_t *lut/* * - Encodes BNLM public parameters into VMEM parameters * - Generates VMEM parameters which will needed internally ISP -* */ +*/ void ia_css_bnlm_vmem_encode( struct bnlm_vmem_params *to,
Signature · 1 line
2.9.3
PATCH 6/9 staging: media: atomisp: Removes the FSF mailing address.
In reply to a message not in the archiveThis patch fixes the checkpatch issue by removing the Free Software Foundation's mailing address from the sample GPL notice. Because the FSF has changed address in the past, and may change again. Linux already includes a copy of the GPL.
--- drivers/staging/media/atomisp/i2c/gc0310.c | 5 ----- drivers/staging/media/atomisp/i2c/gc2235.c | 5 ----- drivers/staging/media/atomisp/i2c/ov2680.c | 5 ----- drivers/staging/media/atomisp/i2c/ov2722.c | 5 ----- 4 files changed, 20 deletions(-)
drivers/staging/media/atomisp/i2c/gc0310.c +0 -5
@@ -12,11 +12,6 @@* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -* 02110-1301, USA. -* */ #include <linux/module.h>
drivers/staging/media/atomisp/i2c/gc2235.c +0 -5
@@ -12,11 +12,6 @@* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -* 02110-1301, USA. -* */ #include <linux/module.h>
drivers/staging/media/atomisp/i2c/ov2680.c +0 -5
@@ -12,11 +12,6 @@* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -* 02110-1301, USA. -* */ #include <linux/module.h>
drivers/staging/media/atomisp/i2c/ov2722.c +0 -5
@@ -12,11 +12,6 @@* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -* 02110-1301, USA. -* */ #include <linux/module.h>
Signature · 1 line
2.9.3
PATCH 7/9 staging: media: atomisp: Use unsigned int instead of unsigned.
In reply to a message not in the archiveUsage of unsigned int is preferred over unsigned and this patch fixes the checkpatch issue.
--- .../atomisp2/css2400/isp/kernels/macc/macc1_5/ia_css_macc1_5.host.c | 6 +++--- .../atomisp2/css2400/isp/kernels/macc/macc1_5/ia_css_macc1_5.host.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/macc/macc1_5/ia_css_macc1_5.host.c +3 -3
@@ -30,7 +30,7 @@ voidia_css_macc1_5_encode ( struct sh_css_isp_macc1_5_params *to, const struct ia_css_macc1_5_config *from, - unsigned size) + unsigned int size) { (void)size; to->exp = from->exp;
@@ -40,7 +40,7 @@ voidia_css_macc1_5_vmem_encode ( struct sh_css_isp_macc1_5_vmem_params *params, const struct ia_css_macc1_5_table *from, - unsigned size) + unsigned int size) { unsigned int i, j, k, idx; unsigned int idx_map[] = {
@@ -65,7 +65,7 @@ ia_css_macc1_5_vmem_encode(void ia_css_macc1_5_debug_dtrace (const struct ia_css_macc1_5_config *config, -unsigned level) +unsigned int level) { ia_css_debug_dtrace(level, "config.exp=%d\n",
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/macc/macc1_5/ia_css_macc1_5.host.h +3 -3
@@ -24,18 +24,18 @@ voidia_css_macc1_5_encode ( struct sh_css_isp_macc1_5_params *to, const struct ia_css_macc1_5_config *from, - unsigned size); + unsigned int size);void ia_css_macc1_5_vmem_encode (struct sh_css_isp_macc1_5_vmem_params *params,const struct ia_css_macc1_5_table *from, -unsigned size); +unsigned int size);#ifndef IA_CSS_NO_DEBUG void ia_css_macc1_5_debug_dtrace (const struct ia_css_macc1_5_config *config, -unsigned level); +unsigned int level);#endif #endif /* __IA_CSS_MACC1_5_HOST_H */
Signature · 1 line
2.9.3
PATCH 8/9 staging: media: atomisp: Fixed typo.
In reply to a message not in the archiveCorrected the spelling of initialize. This patch fixes the checkpatch issue.
--- .../atomisp/pci/atomisp2/css2400/isp/kernels/bnlm/ia_css_bnlm.host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bnlm/ia_css_bnlm.host.c +1 -1
@@ -64,7 +64,7 @@ bnlm_lut_encode(struct bnlm_lut *lut, const int32_t *lut_thr, const int32_t *lutassert (lut_thr[i] <= lut_thr[i+1 ]); } -/* Intialize */ +/* Initialize */ for (i =0 ; i < total_blocks * block_size; i++) { lut->thr[0 ][i] =0 ; lut->val[0 ][i] =0 ;
Signature · 1 line
2.9.3
PATCH 9/9 staging: media: atomisp: Replace NULL comparison.
In reply to a message not in the archiveReplaced x == NULL with !x, by using the following coccinelle script:
@disable is_null@
expression e;
@@
-e==NULL
+!e
This patch fixes the checkpatch issue.
--- drivers/staging/media/atomisp/i2c/gc0310.c | 10 +++++----- drivers/staging/media/atomisp/i2c/gc2235.c | 10 +++++----- drivers/staging/media/atomisp/i2c/ov2680.c | 10 +++++----- drivers/staging/media/atomisp/i2c/ov2722.c | 12 ++++++------ 4 files changed, 21 insertions(+), 21 deletions(-)
drivers/staging/media/atomisp/i2c/gc0310.c +5 -5
@@ -294,7 +294,7 @@ static int gc0310_get_intg_factor(struct i2c_client *client,unsigned int vert_blanking;unsigned int sh_delay; -if (info ==NULL ) +if (!info)return -EINVAL ;/* pixel clock calculattion */
@@ -803,7 +803,7 @@ static int power_up(struct v4l2_subdev *sd)int ret;pr_info ("%s S\n" , __func__); -if (NULL == dev->platform_data) { +if (!dev->platform_data) {dev_err (&client->dev,"no camera_sensor_platform_data" );return -ENODEV ;
@@ -848,7 +848,7 @@ static int power_down(struct v4l2_subdev *sd)struct i2c_client *client =v4l2_get_subdevdata (sd);int ret =0 ; -if (NULL == dev->platform_data) { +if (!dev->platform_data) {dev_err (&client->dev,"no camera_sensor_platform_data" );return -ENODEV ;
@@ -996,7 +996,7 @@ static int gc0310_set_fmt(struct v4l2_subdev *sd,return -EINVAL ; gc0310_info =v4l2_get_subdev_hostdata (sd); -if (gc0310_info ==NULL ) +if (!gc0310_info)return -EINVAL ;mutex_lock (&dev->input_lock);
@@ -1159,7 +1159,7 @@ static int gc0310_s_config(struct v4l2_subdev *sd,int ret =0 ;pr_info ("%s S\n" , __func__); -if (platform_data ==NULL ) +if (!platform_data)return -ENODEV ; dev->platform_data =
drivers/staging/media/atomisp/i2c/gc2235.c +5 -5
@@ -250,7 +250,7 @@ static int gc2235_get_intg_factor(struct i2c_client *client,u16 reg_val, reg_val_h, dummy;int ret; -if (info ==NULL ) +if (!info)return -EINVAL ;/* pixel clock calculattion */
@@ -596,7 +596,7 @@ static int power_up(struct v4l2_subdev *sd)struct i2c_client *client =v4l2_get_subdevdata (sd);int ret; -if (NULL == dev->platform_data) { +if (!dev->platform_data) {dev_err (&client->dev,"no camera_sensor_platform_data" );return -ENODEV ;
@@ -640,7 +640,7 @@ static int power_down(struct v4l2_subdev *sd)struct i2c_client *client =v4l2_get_subdevdata (sd);int ret =0 ; -if (NULL == dev->platform_data) { +if (!dev->platform_data) {dev_err (&client->dev,"no camera_sensor_platform_data" );return -ENODEV ;
@@ -789,7 +789,7 @@ static int gc2235_set_fmt(struct v4l2_subdev *sd,int idx; gc2235_info =v4l2_get_subdev_hostdata (sd); -if (gc2235_info ==NULL ) +if (!gc2235_info)return -EINVAL ;if (format->pad)return -EINVAL ;
@@ -908,7 +908,7 @@ static int gc2235_s_config(struct v4l2_subdev *sd,struct i2c_client *client =v4l2_get_subdevdata (sd);int ret =0 ; -if (platform_data ==NULL ) +if (!platform_data)return -ENODEV ; dev->platform_data =
drivers/staging/media/atomisp/i2c/ov2680.c +5 -5
@@ -323,7 +323,7 @@ static int ov2680_get_intg_factor(struct i2c_client *client,u16 reg_val;int ret;ov2680_debug (dev,"++++ov2680_get_intg_factor\n" ); -if (info ==NULL ) +if (!info)return -EINVAL ;/* pixel clock */
@@ -899,7 +899,7 @@ static int power_up(struct v4l2_subdev *sd)struct i2c_client *client =v4l2_get_subdevdata (sd);int ret; -if (NULL == dev->platform_data) { +if (!dev->platform_data) {dev_err (&client->dev,"no camera_sensor_platform_data" );return -ENODEV ;
@@ -948,7 +948,7 @@ static int power_down(struct v4l2_subdev *sd) h_flag =0 ; v_flag =0 ; -if (NULL == dev->platform_data) { +if (!dev->platform_data) {dev_err (&client->dev,"no camera_sensor_platform_data" );return -ENODEV ;
@@ -1077,7 +1077,7 @@ static int ov2680_set_fmt(struct v4l2_subdev *sd,return -EINVAL ; ov2680_info =v4l2_get_subdev_hostdata (sd); -if (ov2680_info ==NULL ) +if (!ov2680_info)return -EINVAL ;mutex_lock (&dev->input_lock);
@@ -1233,7 +1233,7 @@ static int ov2680_s_config(struct v4l2_subdev *sd,struct i2c_client *client =v4l2_get_subdevdata (sd);int ret =0 ; -if (platform_data ==NULL ) +if (!platform_data)return -ENODEV ; dev->platform_data =
drivers/staging/media/atomisp/i2c/ov2722.c +6 -6
@@ -295,7 +295,7 @@ static int ov2722_get_intg_factor(struct i2c_client *client,u16 reg_val;int ret; -if (info ==NULL ) +if (!info)return -EINVAL ; dev =to_ov2722_sensor (sd);
@@ -699,7 +699,7 @@ static int power_up(struct v4l2_subdev *sd)struct i2c_client *client =v4l2_get_subdevdata (sd);int ret; -if (NULL == dev->platform_data) { +if (!dev->platform_data) {dev_err (&client->dev,"no camera_sensor_platform_data" );return -ENODEV ;
@@ -746,7 +746,7 @@ static int power_down(struct v4l2_subdev *sd)struct i2c_client *client =v4l2_get_subdevdata (sd);int ret =0 ; -if (NULL == dev->platform_data) { +if (!dev->platform_data) {dev_err (&client->dev,"no camera_sensor_platform_data" );return -ENODEV ;
@@ -893,7 +893,7 @@ static int ov2722_set_fmt(struct v4l2_subdev *sd,if (!fmt)return -EINVAL ; ov2722_info =v4l2_get_subdev_hostdata (sd); -if (ov2722_info ==NULL ) +if (!ov2722_info)return -EINVAL ;mutex_lock (&dev->input_lock);
@@ -1037,7 +1037,7 @@ static int ov2722_s_config(struct v4l2_subdev *sd,struct i2c_client *client =v4l2_get_subdevdata (sd);int ret =0 ; -if (platform_data ==NULL ) +if (!platform_data)return -ENODEV ; dev->platform_data =
@@ -1268,7 +1268,7 @@ static int __ov2722_init_ctrl_handler(struct ov2722_device *dev) dev->link_freq =v4l2_ctrl_find (&dev->ctrl_handler,V4L2_CID_LINK_FREQ ); -if (dev->ctrl_handler.error || dev->link_freq ==NULL ) +if (dev->ctrl_handler.error || !dev->link_freq)return dev->ctrl_handler.error; dev->sd.ctrl_handler = hdl;
Signature · 1 line
2.9.3
Re: [Outreachy kernel] [PATCH 8/9] staging: media: atomisp: Fixed typo.
In reply to Varsha RaoQuoted 2 lines · Varsha Rao
Corrected the spelling of initialize. This patch fixes the checkpatch issue.
Remember to use the imperative. Fix typo, Correct the spelling...
julia
Quoted 29 lines
Signed-off-by Varsha Rao <[email protected]>--- .../atomisp/pci/atomisp2/css2400/isp/kernels/bnlm/ia_css_bnlm.host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bnlm/ia_css_bnlm.host.c +1
-2@@ -64,7 +64,7 @@ bnlm_lut_encode(struct bnlm_lut *lut, const int32_t *lut_thr, const int32_t *lutassert (lut_thr[i] <= lut_thr[i+1 ]); } -/* Intialize */ +/* Initialize */ for (i =0 ; i < total_blocks * block_size; i++) { lut->thr[0 ][i] =0 ; lut->val[0 ][i] =0 ; --2.9.3
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/58b9c585.1bd1620a.230a1.2d3e%40mx.google.com.
For more options, visit https://groups.google.com/d/optout.