devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
To: Girish KS <girishks2000-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Girish K S <ks.giri-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Linux Kernel Mailing List
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Jassi Singh
	<jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"Anna, Suman" <s-anna-l0cyMroinI0@public.gmane.org>,
	Ilho Lee <ilho215.lee-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Subject: Re: [PATCH 1/2] mailbox: samsung: added support for samsung mailbox
Date: Tue, 18 Mar 2014 03:56:48 -0700	[thread overview]
Message-ID: <1395140208.2812.15.camel@joe-AO722> (raw)
In-Reply-To: <CAKrE-KcA6VUUwUjAGuW+nYsFg0qknfZwECtdVS8ZtZb4GYoCvA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Tue, 2014-03-18 at 15:52 +0530, Girish KS wrote:
> On Mon, Mar 17, 2014 at 5:33 PM, Girish K S <ks.giri-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> wrote:

Hi, just some trivial notes about the patch

> > diff --git a/drivers/mailbox/mailbox-samsung.c b/drivers/mailbox/mailbox-samsung.c
[]
> > @@ -0,0 +1,354 @@
> > +/*
> > + * Copyright 2013 Samsung Electronics Co. Ltd.
> > + *
> > + * This program is free software; you can redistribute it and/or modify it
> > + * under the terms and conditions of the GNU General Public License,
> > + * version 2, as published by the Free Software Foundation.
> > + *
> > + * This program is distributed in the hope it will be useful, but WITHOUT
> > + * ANY WARRANTY; without even the implied warranty of 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, see <http://www.gnu.org/licenses/>.
> > + */

Please add

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

before any #include so that error messages are
prefixed in the output with "samsung-mailbox: "
and the reader of the log has an idea what subsystem
is emitting messages.

> > +#include <linux/err.h>
> > +#include <linux/module.h>
> > +#include <linux/slab.h>
[]
> > +static int samsung_mbox_send_data(struct ipc_link *link, void *msg)
> > +{
[]
> > +       /* Lock the mailbox for this transaction with the client id */
> > +       writel(val, ipc_base + MBOX_REG_TXLOCK);
> > +       do {
> > +               if (time_after(jiffies, timeout)) {
> > +                       pr_err("cannot aquire the lock\n");

This would be prefixed appropriately via pr_fmt.
Also, there's a typo of aquire here: acquire

> > +static int samsung_mbox_startup(struct ipc_link *link, void *ignored)
> > +{
[]
> > +       ret = devm_request_irq(dev, samsung_link->irq, samsung_ipc_handler,
> > +                                       IRQF_SHARED, link->link_name,
> > +                                       samsung_link);
> > +       if (unlikely(ret)) {
> > +               pr_err("failed to register mailbox interrupt:%d\n", ret);

Here too it would be prefixed

> > +static int samsung_mbox_probe(struct platform_device *pdev)
> > +{
> > +       struct samsung_mbox *samsung_mbox;
> > +       struct samsung_mlink *mbox_link;
> > +       struct resource res;
> > +       struct ipc_link **link;
> > +       int loop, count, ret = 0;
> > +       struct device_node *node = pdev->dev.of_node;
> > +
> > +       if (!node) {
> > +               dev_err(&pdev->dev, "driver doesnt support"
> > +                               "non-dt devices\n");

Please coalesce the format fragments.

You would notice the missing space between
"support" and "non-dt"

		dev_err(&pdev->dev, "driver does not support non-dt devices\n");

It's OK to exceed 80 columns for these format strings.

> > diff --git a/include/linux/mailbox-samsung.h b/include/linux/mailbox-samsung.h
[]
> > +static inline unsigned long get_alligned_buffer(void)

Typo: There's one l in aligned

> > +{
> > +       return __get_free_pages(GFP_KERNEL, REQUEST_PAGE_ORDER);
> > +}
> > +
> > +static inline void put_alligned_buffer(unsigned long addr)
> > +{

here too

> > +       free_pages(addr, REQUEST_PAGE_ORDER);
> > +}
> > +


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2014-03-18 10:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-17 12:03 [PATCH 0/2] Support for samsung mailbox controller Girish K S
     [not found] ` <1395057839-23871-1-git-send-email-ks.giri-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-03-17 12:03   ` [PATCH 1/2] mailbox: samsung: added support for samsung mailbox Girish K S
     [not found]     ` <1395057839-23871-2-git-send-email-ks.giri-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-03-18 10:22       ` Girish KS
     [not found]         ` <CAKrE-KcA6VUUwUjAGuW+nYsFg0qknfZwECtdVS8ZtZb4GYoCvA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-18 10:56           ` Joe Perches [this message]
2014-03-19  3:49             ` Girish KS
2014-03-17 12:03   ` [PATCH 2/2] arm64: dts: exynos: added mailbox node Girish K S
     [not found]     ` <1395057839-23871-3-git-send-email-ks.giri-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-03-17 12:08       ` Girish KS
2014-03-17 12:15       ` Arnd Bergmann
2014-03-17 14:58         ` Jassi Brar
2014-03-19 17:46           ` Arnd Bergmann
     [not found]             ` <201403191846.28563.arnd-r2nGTMty4D4@public.gmane.org>
2014-03-20 16:09               ` Jassi Brar
2014-03-20 16:12                 ` Arnd Bergmann
2014-03-20 16:31                   ` Jassi Brar
2014-03-17 14:06     ` Mark Rutland
2014-03-19  4:06       ` Girish KS

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=1395140208.2812.15.camel@joe-AO722 \
    --to=joe-6d6dil74uinbdgjk7y7tuq@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=girishks2000-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=ilho215.lee-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=ks.giri-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=s-anna-l0cyMroinI0@public.gmane.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).