All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chanwoo Choi <cw00.choi@samsung.com>
To: Markus Elfring <Markus.Elfring@web.de>,
	linux-clk@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Tomasz Figa <tomasz.figa@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org, Aditya Pakki <pakki001@umn.edu>,
	Kangjie Lu <kjlu@umn.edu>, Navid Emamdoost <emamd001@umn.edu>,
	Stephen McCamant <smccaman@umn.edu>
Subject: Re: clk: samsung: Checking a kmemdup() call in _samsung_clk_register_pll()
Date: Mon, 14 Oct 2019 15:55:38 +0900	[thread overview]
Message-ID: <725ace30-a4a7-25dd-2351-f007bb8b35ed@samsung.com> (raw)
In-Reply-To: <c1bc5e4d-0802-4485-2c07-248bab2a3330@web.de>

Hello,

On 19. 10. 12. 오후 11:17, Markus Elfring wrote:
> Hello,
> 
> I tried another script for the semantic patch language out.
> This source code analysis approach points out that the implementation
> of the function “_samsung_clk_register_pll” contains also a call
> of the function “kmemdup”.
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/clk/samsung/clk-pll.c?id=1c0cc5f1ae5ee5a6913704c0d75a6e99604ee30a#n1275
> https://protect2.fireeye.com/url?k=7e77b0ebee9a0c3e.7e763ba4-43f341fdfe1d32b1&u=https://elixir.bootlin.com/linux/v5.4-rc2/source/drivers/clk/samsung/clk-pll.c#L1275
> 
> * Do you find the usage of the format string “%s: could not allocate
>   rate table for %s\n” still appropriate at this place?
> 
> * Is there a need to adjust the error handling here?

drivers/clk/samsung/clk-pll.c considers the case of 'pll->rate_table is NULL'
So, maybe just show the warning message if failed to allocate memory
of 'pll->rate_table'. Bu, IMHO, the error handling is necessary
in order to support what 'pll_clk->rate_table' isn't NULL.

> 
> Regards,
> Markus
> 
> 


-- 
Best Regards,
Chanwoo Choi
Samsung Electronics

WARNING: multiple messages have this Message-ID (diff)
From: Chanwoo Choi <cw00.choi@samsung.com>
To: Markus Elfring <Markus.Elfring@web.de>,
	linux-clk@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Tomasz Figa <tomasz.figa@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org, Aditya Pakki <pakki001@umn.edu>,
	Kangjie Lu <kjlu@umn.edu>, Navid Emamdoost <emamd001@umn.edu>,
	Stephen McCamant <smccaman@umn.edu>
Subject: Re: clk: samsung: Checking a kmemdup() call in _samsung_clk_register_pll()
Date: Mon, 14 Oct 2019 06:55:38 +0000	[thread overview]
Message-ID: <725ace30-a4a7-25dd-2351-f007bb8b35ed@samsung.com> (raw)
In-Reply-To: <c1bc5e4d-0802-4485-2c07-248bab2a3330@web.de>

Hello,

On 19. 10. 12. 오후 11:17, Markus Elfring wrote:
> Hello,
> 
> I tried another script for the semantic patch language out.
> This source code analysis approach points out that the implementation
> of the function “_samsung_clk_register_pll” contains also a call
> of the function “kmemdup”.
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/clk/samsung/clk-pll.c?id\x1c0cc5f1ae5ee5a6913704c0d75a6e99604ee30a#n1275
> https://protect2.fireeye.com/url?k~77b0ebee9a0c3e.7e763ba4-43f341fdfe1d32b1&u=https://elixir.bootlin.com/linux/v5.4-rc2/source/drivers/clk/samsung/clk-pll.c#L1275
> 
> * Do you find the usage of the format string “%s: could not allocate
>   rate table for %s\n” still appropriate at this place?
> 
> * Is there a need to adjust the error handling here?

drivers/clk/samsung/clk-pll.c considers the case of 'pll->rate_table is NULL'
So, maybe just show the warning message if failed to allocate memory
of 'pll->rate_table'. Bu, IMHO, the error handling is necessary
in order to support what 'pll_clk->rate_table' isn't NULL.

> 
> Regards,
> Markus
> 
> 


-- 
Best Regards,
Chanwoo Choi
Samsung Electronics

  reply	other threads:[~2019-10-14  6:50 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20191012141739epcas3p31e41c151b30d49c94aeb933aa42dc9f7@epcas3p3.samsung.com>
2019-10-12 14:17 ` clk: samsung: Checking a kmemdup() call in _samsung_clk_register_pll() Markus Elfring
2019-10-12 14:17   ` Markus Elfring
2019-10-14  6:55   ` Chanwoo Choi [this message]
2019-10-14  6:55     ` Chanwoo Choi
2019-10-14  8:05     ` Markus Elfring
2019-10-14  8:05       ` Markus Elfring
2019-10-12 14:17 Markus Elfring
2019-10-12 14:17 ` Markus Elfring
2019-10-15 14:49 ` Tomasz Figa
2019-10-15 14:49   ` Tomasz Figa
2019-10-15 17:55   ` Markus Elfring
2019-10-15 17:55     ` Markus Elfring
2019-10-16 11:43     ` Tomasz Figa
2019-10-16 11:43       ` Tomasz Figa
2019-10-16 11:58       ` Markus Elfring
2019-10-16 11:58         ` Markus Elfring
2019-10-15 17:55   ` Markus Elfring
2019-10-15 17:55     ` Markus Elfring
2019-10-16 10:55   ` Markus Elfring
2019-10-16 10:55     ` Markus Elfring
2019-10-16 11:44     ` Tomasz Figa
2019-10-16 11:44       ` Tomasz Figa

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=725ace30-a4a7-25dd-2351-f007bb8b35ed@samsung.com \
    --to=cw00.choi@samsung.com \
    --cc=Markus.Elfring@web.de \
    --cc=emamd001@umn.edu \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kjlu@umn.edu \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=pakki001@umn.edu \
    --cc=s.nawrocki@samsung.com \
    --cc=sboyd@kernel.org \
    --cc=smccaman@umn.edu \
    --cc=tomasz.figa@gmail.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 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.