From: Greg KH <gregkh@linuxfoundation.org>
To: Madhumitha Prabakaran <madhumithabiw@gmail.com>
Cc: mchehab@kernel.org, outreachy-kernel@googlegroups.com
Subject: Re: [PATCH v2] Staging: media: davinci_vpfe: Convert ceil macro into an inline function
Date: Fri, 29 Mar 2019 17:04:51 +0100 [thread overview]
Message-ID: <20190329160451.GA6197@kroah.com> (raw)
In-Reply-To: <20190327180052.30298-1-madhumithabiw@gmail.com>
On Wed, Mar 27, 2019 at 01:00:52PM -0500, Madhumitha Prabakaran wrote:
> Convert macro into an inline function in order to maintain Linux kernel
> coding style based on which the inline function is preferable over the
> macro.
>
> Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com>
>
> ---
> Changes in v2 -
>
> - Corrected commit log spelling
> - Made the subject line unique from previous commit
> ---
> drivers/staging/media/davinci_vpfe/dm365_ipipe.h | 5 ++++-
> drivers/staging/media/davinci_vpfe/dm365_resizer.c | 4 ++--
> 2 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe.h b/drivers/staging/media/davinci_vpfe/dm365_ipipe.h
> index 174334b53f96..32dce3c95304 100644
> --- a/drivers/staging/media/davinci_vpfe/dm365_ipipe.h
> +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe.h
> @@ -27,7 +27,10 @@
> #include "davinci_vpfe_user.h"
> #include "vpfe_video.h"
>
> -#define CEIL(a, b) (((a) + (b-1)) / (b))
> +inline unsigned int ceil(unsigned int a, unsigned int b)
> +{
> + return ((a + (b - 1)) / b);
> +}
Please just convert the caller to use the in-kernel function for this
instead of having a second one in just this driver.
thanks,
greg k-h
next prev parent reply other threads:[~2019-03-29 16:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-27 18:00 [PATCH v2] Staging: media: davinci_vpfe: Convert ceil macro into an inline function Madhumitha Prabakaran
2019-03-29 16:04 ` Greg KH [this message]
2019-04-01 22:32 ` Madhumthia Prabakaran
2019-04-02 5:21 ` Greg KH
2019-04-02 14:58 ` Madhumthia Prabakaran
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=20190329160451.GA6197@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=madhumithabiw@gmail.com \
--cc=mchehab@kernel.org \
--cc=outreachy-kernel@googlegroups.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.