All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/clk/clk-apple-nco.c:216:20: warning: Parameter 'parent_rate' can be declared with const [constParameter]
@ 2022-04-08 14:20 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-04-08 14:20 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 9641 bytes --]

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: "Martin Povišer" <povik+lin@cutebit.org>
CC: Stephen Boyd <sboyd@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   1831fed559732b132aef0ea8261ac77e73f7eadf
commit: 6641057d5dba87338780cf3e0d0ae8389ef1125c clk: clk-apple-nco: Add driver for Apple NCO
date:   4 weeks ago
:::::: branch date: 9 hours ago
:::::: commit date: 4 weeks ago
compiler: aarch64-linux-gcc (GCC) 11.2.0
reproduce (cppcheck warning):
        # apt-get install cppcheck
        git checkout 6641057d5dba87338780cf3e0d0ae8389ef1125c
        cppcheck --quiet --enable=style,performance,portability --template=gcc FILE

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> drivers/clk/socfpga/clk-s10.c:401:53: warning: Uninitialized variable: clk_data [uninitvar]
    clk_data = devm_kzalloc(dev, struct_size(clk_data, clk_data.hws,
                                                       ^
--
>> drivers/clk/clk-apple-nco.c:216:20: warning: Parameter 'parent_rate' can be declared with const [constParameter]
       unsigned long *parent_rate)
                      ^
>> drivers/clk/clk-apple-nco.c:180:19: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    writel_relaxed(1 << 31, chan->base + REG_ACCINIT);
                     ^
   drivers/clk/clk-apple-nco.c:205:17: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    if (inc1 >= (1 << 31) || inc2 < (1 << 31) || (inc1 == 0 && inc2 == 0))
                   ^
>> drivers/clk/clk-apple-nco.c:180:19: warning: Signed integer overflow for expression '1<<31'. [integerOverflow]
    writel_relaxed(1 << 31, chan->base + REG_ACCINIT);
                     ^
   drivers/clk/clk-apple-nco.c:205:17: warning: Signed integer overflow for expression '1<<31'. [integerOverflow]
    if (inc1 >= (1 << 31) || inc2 < (1 << 31) || (inc1 == 0 && inc2 == 0))
                   ^
--
>> drivers/clk/sifive/sifive-prci.c:237:10: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    if (r & PRCI_COREPLLCFG1_CKE_MASK)
            ^
   drivers/clk/sifive/sifive-prci.c:252:35: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    __prci_wrpll_write_cfg1(pd, pwd, PRCI_COREPLLCFG1_CKE_MASK);
                                     ^
   drivers/clk/sifive/sifive-prci.c:271:8: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    r &= ~PRCI_COREPLLCFG1_CKE_MASK;
          ^
>> drivers/clk/sifive/sifive-prci.c:237:10: warning: Signed integer overflow for expression '0x1<<31'. [integerOverflow]
    if (r & PRCI_COREPLLCFG1_CKE_MASK)
            ^
   drivers/clk/sifive/sifive-prci.c:252:35: warning: Signed integer overflow for expression '0x1<<31'. [integerOverflow]
    __prci_wrpll_write_cfg1(pd, pwd, PRCI_COREPLLCFG1_CKE_MASK);
                                     ^
   drivers/clk/sifive/sifive-prci.c:271:8: warning: Signed integer overflow for expression '0x1<<31'. [integerOverflow]
    r &= ~PRCI_COREPLLCFG1_CKE_MASK;
          ^
>> drivers/dma/qcom/hidma.c:135:48: warning: Uninitialized variable: mdesc->tre_ch [uninitvar]
     llstat = hidma_ll_status(mdma->lldev, mdesc->tre_ch);
                                                  ^
>> drivers/dma/qcom/hidma.c:239:48: warning: Uninitialized variable: qdesc->tre_ch [uninitvar]
     hidma_ll_queue_request(dmadev->lldev, qdesc->tre_ch);
                                                  ^
   drivers/dma/qcom/hidma.c:542:37: warning: Uninitialized variable: mdesc->tre_ch [uninitvar]
     hidma_ll_free(mdma->lldev, mdesc->tre_ch);
                                       ^

vim +/parent_rate +216 drivers/clk/clk-apple-nco.c

6641057d5dba873 Martin Povišer 2022-02-08  153  
6641057d5dba873 Martin Povišer 2022-02-08  154  static int applnco_set_rate(struct clk_hw *hw, unsigned long rate,
6641057d5dba873 Martin Povišer 2022-02-08  155  				unsigned long parent_rate)
6641057d5dba873 Martin Povišer 2022-02-08  156  {
6641057d5dba873 Martin Povišer 2022-02-08  157  	struct applnco_channel *chan = to_applnco_channel(hw);
6641057d5dba873 Martin Povišer 2022-02-08  158  	unsigned long flags;
6641057d5dba873 Martin Povišer 2022-02-08  159  	u32 div, inc1, inc2;
6641057d5dba873 Martin Povišer 2022-02-08  160  	bool was_enabled;
6641057d5dba873 Martin Povišer 2022-02-08  161  
6641057d5dba873 Martin Povišer 2022-02-08  162  	div = 2 * parent_rate / rate;
6641057d5dba873 Martin Povišer 2022-02-08  163  	inc1 = 2 * parent_rate - div * rate;
6641057d5dba873 Martin Povišer 2022-02-08  164  	inc2 = inc1 - rate;
6641057d5dba873 Martin Povišer 2022-02-08  165  
6641057d5dba873 Martin Povišer 2022-02-08  166  	if (applnco_div_out_of_range(div))
6641057d5dba873 Martin Povišer 2022-02-08  167  		return -EINVAL;
6641057d5dba873 Martin Povišer 2022-02-08  168  
6641057d5dba873 Martin Povišer 2022-02-08  169  	div = applnco_div_translate(chan->tbl, div);
6641057d5dba873 Martin Povišer 2022-02-08  170  
6641057d5dba873 Martin Povišer 2022-02-08  171  	spin_lock_irqsave(&chan->lock, flags);
6641057d5dba873 Martin Povišer 2022-02-08  172  	was_enabled = applnco_is_enabled(hw);
6641057d5dba873 Martin Povišer 2022-02-08  173  	applnco_disable_nolock(hw);
6641057d5dba873 Martin Povišer 2022-02-08  174  
6641057d5dba873 Martin Povišer 2022-02-08  175  	writel_relaxed(div,  chan->base + REG_DIV);
6641057d5dba873 Martin Povišer 2022-02-08  176  	writel_relaxed(inc1, chan->base + REG_INC1);
6641057d5dba873 Martin Povišer 2022-02-08  177  	writel_relaxed(inc2, chan->base + REG_INC2);
6641057d5dba873 Martin Povišer 2022-02-08  178  
6641057d5dba873 Martin Povišer 2022-02-08  179  	/* Presumably a neutral initial value for accumulator */
6641057d5dba873 Martin Povišer 2022-02-08 @180  	writel_relaxed(1 << 31, chan->base + REG_ACCINIT);
6641057d5dba873 Martin Povišer 2022-02-08  181  
6641057d5dba873 Martin Povišer 2022-02-08  182  	if (was_enabled)
6641057d5dba873 Martin Povišer 2022-02-08  183  		applnco_enable_nolock(hw);
6641057d5dba873 Martin Povišer 2022-02-08  184  	spin_unlock_irqrestore(&chan->lock, flags);
6641057d5dba873 Martin Povišer 2022-02-08  185  
6641057d5dba873 Martin Povišer 2022-02-08  186  	return 0;
6641057d5dba873 Martin Povišer 2022-02-08  187  }
6641057d5dba873 Martin Povišer 2022-02-08  188  
6641057d5dba873 Martin Povišer 2022-02-08  189  static unsigned long applnco_recalc_rate(struct clk_hw *hw,
6641057d5dba873 Martin Povišer 2022-02-08  190  				unsigned long parent_rate)
6641057d5dba873 Martin Povišer 2022-02-08  191  {
6641057d5dba873 Martin Povišer 2022-02-08  192  	struct applnco_channel *chan = to_applnco_channel(hw);
6641057d5dba873 Martin Povišer 2022-02-08  193  	u32 div, inc1, inc2, incbase;
6641057d5dba873 Martin Povišer 2022-02-08  194  
6641057d5dba873 Martin Povišer 2022-02-08  195  	div = applnco_div_translate_inv(chan->tbl,
6641057d5dba873 Martin Povišer 2022-02-08  196  			readl_relaxed(chan->base + REG_DIV));
6641057d5dba873 Martin Povišer 2022-02-08  197  
6641057d5dba873 Martin Povišer 2022-02-08  198  	inc1 = readl_relaxed(chan->base + REG_INC1);
6641057d5dba873 Martin Povišer 2022-02-08  199  	inc2 = readl_relaxed(chan->base + REG_INC2);
6641057d5dba873 Martin Povišer 2022-02-08  200  
6641057d5dba873 Martin Povišer 2022-02-08  201  	/*
6641057d5dba873 Martin Povišer 2022-02-08  202  	 * We don't support wraparound of accumulator
6641057d5dba873 Martin Povišer 2022-02-08  203  	 * nor the edge case of both increments being zero
6641057d5dba873 Martin Povišer 2022-02-08  204  	 */
6641057d5dba873 Martin Povišer 2022-02-08  205  	if (inc1 >= (1 << 31) || inc2 < (1 << 31) || (inc1 == 0 && inc2 == 0))
6641057d5dba873 Martin Povišer 2022-02-08  206  		return 0;
6641057d5dba873 Martin Povišer 2022-02-08  207  
6641057d5dba873 Martin Povišer 2022-02-08  208  	/* Scale both sides of division by incbase to maintain precision */
6641057d5dba873 Martin Povišer 2022-02-08  209  	incbase = inc1 - inc2;
6641057d5dba873 Martin Povišer 2022-02-08  210  
6641057d5dba873 Martin Povišer 2022-02-08  211  	return div64_u64(((u64) parent_rate) * 2 * incbase,
6641057d5dba873 Martin Povišer 2022-02-08  212  			((u64) div) * incbase + inc1);
6641057d5dba873 Martin Povišer 2022-02-08  213  }
6641057d5dba873 Martin Povišer 2022-02-08  214  
6641057d5dba873 Martin Povišer 2022-02-08  215  static long applnco_round_rate(struct clk_hw *hw, unsigned long rate,
6641057d5dba873 Martin Povišer 2022-02-08 @216  				unsigned long *parent_rate)
6641057d5dba873 Martin Povišer 2022-02-08  217  {
6641057d5dba873 Martin Povišer 2022-02-08  218  	unsigned long lo = *parent_rate / (COARSE_DIV_OFFSET + LFSR_TBLSIZE) + 1;
6641057d5dba873 Martin Povišer 2022-02-08  219  	unsigned long hi = *parent_rate / COARSE_DIV_OFFSET;
6641057d5dba873 Martin Povišer 2022-02-08  220  
6641057d5dba873 Martin Povišer 2022-02-08  221  	return clamp(rate, lo, hi);
6641057d5dba873 Martin Povišer 2022-02-08  222  }
6641057d5dba873 Martin Povišer 2022-02-08  223  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 2+ messages in thread

* drivers/clk/clk-apple-nco.c:216:20: warning: Parameter 'parent_rate' can be declared with const [constParameter]
@ 2022-04-18 19:13 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-04-18 19:13 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 10484 bytes --]

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: "Martin Povišer" <povik+lin@cutebit.org>
CC: Stephen Boyd <sboyd@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b2d229d4ddb17db541098b83524d901257e93845
commit: 6641057d5dba87338780cf3e0d0ae8389ef1125c clk: clk-apple-nco: Add driver for Apple NCO
date:   5 weeks ago
:::::: branch date: 22 hours ago
:::::: commit date: 5 weeks ago
compiler: ia64-linux-gcc (GCC) 11.2.0
reproduce (cppcheck warning):
        # apt-get install cppcheck
        git checkout 6641057d5dba87338780cf3e0d0ae8389ef1125c
        cppcheck --quiet --enable=style,performance,portability --template=gcc FILE

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> drivers/clk/clk-apple-nco.c:216:20: warning: Parameter 'parent_rate' can be declared with const [constParameter]
       unsigned long *parent_rate)
                      ^
>> drivers/clk/clk-apple-nco.c:180:19: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    writel_relaxed(1 << 31, chan->base + REG_ACCINIT);
                     ^
   drivers/clk/clk-apple-nco.c:205:17: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    if (inc1 >= (1 << 31) || inc2 < (1 << 31) || (inc1 == 0 && inc2 == 0))
                   ^
>> drivers/clk/clk-apple-nco.c:180:19: warning: Signed integer overflow for expression '1<<31'. [integerOverflow]
    writel_relaxed(1 << 31, chan->base + REG_ACCINIT);
                     ^
   drivers/clk/clk-apple-nco.c:205:17: warning: Signed integer overflow for expression '1<<31'. [integerOverflow]
    if (inc1 >= (1 << 31) || inc2 < (1 << 31) || (inc1 == 0 && inc2 == 0))
                   ^
--
>> drivers/pwm/pwm-mediatek.c:246:3: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
     snprintf(name, sizeof(name), "pwm%d", i + 1);
     ^
--
>> drivers/clk/sifive/sifive-prci.c:237:10: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    if (r & PRCI_COREPLLCFG1_CKE_MASK)
            ^
   drivers/clk/sifive/sifive-prci.c:252:35: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    __prci_wrpll_write_cfg1(pd, pwd, PRCI_COREPLLCFG1_CKE_MASK);
                                     ^
   drivers/clk/sifive/sifive-prci.c:271:8: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    r &= ~PRCI_COREPLLCFG1_CKE_MASK;
          ^
>> drivers/clk/sifive/sifive-prci.c:237:10: warning: Signed integer overflow for expression '0x1<<31'. [integerOverflow]
    if (r & PRCI_COREPLLCFG1_CKE_MASK)
            ^
   drivers/clk/sifive/sifive-prci.c:252:35: warning: Signed integer overflow for expression '0x1<<31'. [integerOverflow]
    __prci_wrpll_write_cfg1(pd, pwd, PRCI_COREPLLCFG1_CKE_MASK);
                                     ^
   drivers/clk/sifive/sifive-prci.c:271:8: warning: Signed integer overflow for expression '0x1<<31'. [integerOverflow]
    r &= ~PRCI_COREPLLCFG1_CKE_MASK;
          ^
>> drivers/clk/qcom/clk-smd-rpm.c:293:40: warning: Same expression in both branches of ternary operator. [duplicateExpressionTernary]
    active_rate = r->branch ? !!peer_rate : peer_rate;
                                          ^
   drivers/clk/qcom/clk-smd-rpm.c:298:45: warning: Same expression in both branches of ternary operator. [duplicateExpressionTernary]
    sleep_rate = r->branch ? !!peer_sleep_rate : peer_sleep_rate;
                                               ^
--
>> drivers/vfio/platform/vfio_platform_common.c:701:34: warning: Parameter 'fn' can be declared with const [constParameter]
           vfio_platform_reset_fn_t fn)
                                    ^
>> drivers/vfio/platform/vfio_platform_common.c:442:47: warning: Parameter 'ppos' can be declared with const [constParameter]
         char __user *buf, size_t count, loff_t *ppos)
                                                 ^
   drivers/vfio/platform/vfio_platform_common.c:519:30: warning: Parameter 'ppos' can be declared with const [constParameter]
          size_t count, loff_t *ppos)
                                ^
>> drivers/vfio/platform/vfio_platform_common.c:39:21: warning: Uninitialized variable: iter->compat [uninitvar]
     if (!strcmp(iter->compat, compat) &&
                       ^
   drivers/vfio/platform/vfio_platform_common.c:707:21: warning: Uninitialized variable: iter->compat [uninitvar]
     if (!strcmp(iter->compat, compat) && (iter->of_reset == fn)) {
                       ^

vim +/parent_rate +216 drivers/clk/clk-apple-nco.c

6641057d5dba87 Martin Povišer 2022-02-08  153  
6641057d5dba87 Martin Povišer 2022-02-08  154  static int applnco_set_rate(struct clk_hw *hw, unsigned long rate,
6641057d5dba87 Martin Povišer 2022-02-08  155  				unsigned long parent_rate)
6641057d5dba87 Martin Povišer 2022-02-08  156  {
6641057d5dba87 Martin Povišer 2022-02-08  157  	struct applnco_channel *chan = to_applnco_channel(hw);
6641057d5dba87 Martin Povišer 2022-02-08  158  	unsigned long flags;
6641057d5dba87 Martin Povišer 2022-02-08  159  	u32 div, inc1, inc2;
6641057d5dba87 Martin Povišer 2022-02-08  160  	bool was_enabled;
6641057d5dba87 Martin Povišer 2022-02-08  161  
6641057d5dba87 Martin Povišer 2022-02-08  162  	div = 2 * parent_rate / rate;
6641057d5dba87 Martin Povišer 2022-02-08  163  	inc1 = 2 * parent_rate - div * rate;
6641057d5dba87 Martin Povišer 2022-02-08  164  	inc2 = inc1 - rate;
6641057d5dba87 Martin Povišer 2022-02-08  165  
6641057d5dba87 Martin Povišer 2022-02-08  166  	if (applnco_div_out_of_range(div))
6641057d5dba87 Martin Povišer 2022-02-08  167  		return -EINVAL;
6641057d5dba87 Martin Povišer 2022-02-08  168  
6641057d5dba87 Martin Povišer 2022-02-08  169  	div = applnco_div_translate(chan->tbl, div);
6641057d5dba87 Martin Povišer 2022-02-08  170  
6641057d5dba87 Martin Povišer 2022-02-08  171  	spin_lock_irqsave(&chan->lock, flags);
6641057d5dba87 Martin Povišer 2022-02-08  172  	was_enabled = applnco_is_enabled(hw);
6641057d5dba87 Martin Povišer 2022-02-08  173  	applnco_disable_nolock(hw);
6641057d5dba87 Martin Povišer 2022-02-08  174  
6641057d5dba87 Martin Povišer 2022-02-08  175  	writel_relaxed(div,  chan->base + REG_DIV);
6641057d5dba87 Martin Povišer 2022-02-08  176  	writel_relaxed(inc1, chan->base + REG_INC1);
6641057d5dba87 Martin Povišer 2022-02-08  177  	writel_relaxed(inc2, chan->base + REG_INC2);
6641057d5dba87 Martin Povišer 2022-02-08  178  
6641057d5dba87 Martin Povišer 2022-02-08  179  	/* Presumably a neutral initial value for accumulator */
6641057d5dba87 Martin Povišer 2022-02-08 @180  	writel_relaxed(1 << 31, chan->base + REG_ACCINIT);
6641057d5dba87 Martin Povišer 2022-02-08  181  
6641057d5dba87 Martin Povišer 2022-02-08  182  	if (was_enabled)
6641057d5dba87 Martin Povišer 2022-02-08  183  		applnco_enable_nolock(hw);
6641057d5dba87 Martin Povišer 2022-02-08  184  	spin_unlock_irqrestore(&chan->lock, flags);
6641057d5dba87 Martin Povišer 2022-02-08  185  
6641057d5dba87 Martin Povišer 2022-02-08  186  	return 0;
6641057d5dba87 Martin Povišer 2022-02-08  187  }
6641057d5dba87 Martin Povišer 2022-02-08  188  
6641057d5dba87 Martin Povišer 2022-02-08  189  static unsigned long applnco_recalc_rate(struct clk_hw *hw,
6641057d5dba87 Martin Povišer 2022-02-08  190  				unsigned long parent_rate)
6641057d5dba87 Martin Povišer 2022-02-08  191  {
6641057d5dba87 Martin Povišer 2022-02-08  192  	struct applnco_channel *chan = to_applnco_channel(hw);
6641057d5dba87 Martin Povišer 2022-02-08  193  	u32 div, inc1, inc2, incbase;
6641057d5dba87 Martin Povišer 2022-02-08  194  
6641057d5dba87 Martin Povišer 2022-02-08  195  	div = applnco_div_translate_inv(chan->tbl,
6641057d5dba87 Martin Povišer 2022-02-08  196  			readl_relaxed(chan->base + REG_DIV));
6641057d5dba87 Martin Povišer 2022-02-08  197  
6641057d5dba87 Martin Povišer 2022-02-08  198  	inc1 = readl_relaxed(chan->base + REG_INC1);
6641057d5dba87 Martin Povišer 2022-02-08  199  	inc2 = readl_relaxed(chan->base + REG_INC2);
6641057d5dba87 Martin Povišer 2022-02-08  200  
6641057d5dba87 Martin Povišer 2022-02-08  201  	/*
6641057d5dba87 Martin Povišer 2022-02-08  202  	 * We don't support wraparound of accumulator
6641057d5dba87 Martin Povišer 2022-02-08  203  	 * nor the edge case of both increments being zero
6641057d5dba87 Martin Povišer 2022-02-08  204  	 */
6641057d5dba87 Martin Povišer 2022-02-08  205  	if (inc1 >= (1 << 31) || inc2 < (1 << 31) || (inc1 == 0 && inc2 == 0))
6641057d5dba87 Martin Povišer 2022-02-08  206  		return 0;
6641057d5dba87 Martin Povišer 2022-02-08  207  
6641057d5dba87 Martin Povišer 2022-02-08  208  	/* Scale both sides of division by incbase to maintain precision */
6641057d5dba87 Martin Povišer 2022-02-08  209  	incbase = inc1 - inc2;
6641057d5dba87 Martin Povišer 2022-02-08  210  
6641057d5dba87 Martin Povišer 2022-02-08  211  	return div64_u64(((u64) parent_rate) * 2 * incbase,
6641057d5dba87 Martin Povišer 2022-02-08  212  			((u64) div) * incbase + inc1);
6641057d5dba87 Martin Povišer 2022-02-08  213  }
6641057d5dba87 Martin Povišer 2022-02-08  214  
6641057d5dba87 Martin Povišer 2022-02-08  215  static long applnco_round_rate(struct clk_hw *hw, unsigned long rate,
6641057d5dba87 Martin Povišer 2022-02-08 @216  				unsigned long *parent_rate)
6641057d5dba87 Martin Povišer 2022-02-08  217  {
6641057d5dba87 Martin Povišer 2022-02-08  218  	unsigned long lo = *parent_rate / (COARSE_DIV_OFFSET + LFSR_TBLSIZE) + 1;
6641057d5dba87 Martin Povišer 2022-02-08  219  	unsigned long hi = *parent_rate / COARSE_DIV_OFFSET;
6641057d5dba87 Martin Povišer 2022-02-08  220  
6641057d5dba87 Martin Povišer 2022-02-08  221  	return clamp(rate, lo, hi);
6641057d5dba87 Martin Povišer 2022-02-08  222  }
6641057d5dba87 Martin Povišer 2022-02-08  223  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-18 19:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-08 14:20 drivers/clk/clk-apple-nco.c:216:20: warning: Parameter 'parent_rate' can be declared with const [constParameter] kernel test robot
2022-04-18 19:13 kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.