Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751646AbeAEE3B (ORCPT + 1 other); Thu, 4 Jan 2018 23:29:01 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:44187 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751417AbeAEE27 (ORCPT ); Thu, 4 Jan 2018 23:28:59 -0500 X-Google-Smtp-Source: ACJfBoua0fjc0i463HZLr8Wh6SeehjHlPUAKj6WorBXq4mlgTs0x9A77jJwaPYs8uJbKO9XelD7xsEhE6BglkY427Zs= MIME-Version: 1.0 In-Reply-To: <1513682145-19892-3-git-send-email-zhongkaihua@huawei.com> References: <1513682145-19892-1-git-send-email-zhongkaihua@huawei.com> <1513682145-19892-3-git-send-email-zhongkaihua@huawei.com> From: Jassi Brar Date: Fri, 5 Jan 2018 09:58:57 +0530 Message-ID: Subject: Re: [PATCH v4 2/3] mailbox: Add support for Hi3660 mailbox To: Kaihua Zhong Cc: Rob Herring , Mark Rutland , Wei Xu , Catalin Marinas , Will Deacon , Devicetree List , Linux Kernel Mailing List , linux-arm-kernel@lists.infradead.org, Guodong Xu , Haojian Zhuang , suzhuangluan@hisilicon.com, xuezhiliang@hisilicon.com, kevin.wangtao@hisilicon.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Tue, Dec 19, 2017 at 4:45 PM, Kaihua Zhong wrote: ..... > diff --git a/drivers/mailbox/hi3660-mailbox.c b/drivers/mailbox/hi3660-mailbox.c > new file mode 100644 > index 0000000..3ceca40 > --- /dev/null > +++ b/drivers/mailbox/hi3660-mailbox.c > @@ -0,0 +1,319 @@ > +// SPDX-License-Identifier: GPL-2.0 > +// Copyright (c) 2017 Hisilicon Limited. > +// Copyright (c) 2017 Linaro Limited. A blank here please. > +#include > +#include > +#include > +#include > +#include > +#include > +#include ..... > + > +static inline struct hi3660_mbox *to_hi3660_mbox(struct mbox_controller *mbox) > inline in .c is out of fasion these days > +{ > + return container_of(mbox, struct hi3660_mbox, controller); > +} > + .... > + > +static int hi3660_mbox_startup(struct mbox_chan *chan) > +{ > + int ret; > + > + ret = hi3660_mbox_check_state(chan); > + if (ret) > + return ret; > + > + ret = hi3660_mbox_unlock(chan); > + if (ret) > + return ret; > + > + ret = hi3660_mbox_acquire_channel(chan); > + if (ret) > + return ret; > + > + return 0; > +} Do you not need to do "release channel" for shutdown() ? ..... > + > +static int hi3660_mbox_send_data(struct mbox_chan *chan, void *msg) > +{ > + return hi3660_mbox_send(chan, msg); > Please directly have hi3660_mbox_send as .send_data Cheers!