From patchwork Fri Nov 13 05:48:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 7608871 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A2D61BF90C for ; Fri, 13 Nov 2015 05:48:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BD00020788 for ; Fri, 13 Nov 2015 05:48:57 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 71083206DE for ; Fri, 13 Nov 2015 05:48:56 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 8AEEA265C99; Fri, 13 Nov 2015 06:48:50 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_LOW, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 94152265AE4; Fri, 13 Nov 2015 06:48:41 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 2A83B265AF2; Fri, 13 Nov 2015 06:48:41 +0100 (CET) Received: from relmlie3.idc.renesas.com (relmlor4.renesas.com [210.160.252.174]) by alsa0.perex.cz (Postfix) with ESMTP id C1B5B265AD3 for ; Fri, 13 Nov 2015 06:48:32 +0100 (CET) Received: from unknown (HELO relmlir2.idc.renesas.com) ([10.200.68.152]) by relmlie3.idc.renesas.com with ESMTP; 13 Nov 2015 14:48:31 +0900 Received: from relmlac1.idc.renesas.com (relmlac1.idc.renesas.com [10.200.69.21]) by relmlir2.idc.renesas.com (Postfix) with ESMTP id 6B71A4C3DA; Fri, 13 Nov 2015 14:48:31 +0900 (JST) Received: by relmlac1.idc.renesas.com (Postfix, from userid 0) id 542168002E; Fri, 13 Nov 2015 14:48:31 +0900 (JST) Received: from relmlac1.idc.renesas.com (localhost [127.0.0.1]) by relmlac1.idc.renesas.com (Postfix) with ESMTP id 4FAEA8002D; Fri, 13 Nov 2015 14:48:31 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac1.idc.renesas.com with ESMTP id QAD31609; Fri, 13 Nov 2015 14:48:31 +0900 X-IronPort-AV: E=Sophos;i="5.20,286,1444662000"; d="scan'";a="199685609" Received: from mail-pu1apc01lp0022.outbound.protection.outlook.com (HELO APC01-PU1-obe.outbound.protection.outlook.com) ([65.55.88.22]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 13 Nov 2015 14:48:15 +0900 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=kuninori.morimoto.gx@renesas.com; Received: from morimoto-PC.renesas.com (211.11.155.144) by HK2PR06MB1012.apcprd06.prod.outlook.com (10.161.188.28) with Microsoft SMTP Server (TLS) id 15.1.325.17; Fri, 13 Nov 2015 05:48:11 +0000 Message-ID: <87egfujvzd.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 To: Mark Brown In-Reply-To: <87fv0ajw2d.wl%kuninori.morimoto.gx@renesas.com> References: <87h9kqjw4h.wl%kuninori.morimoto.gx@renesas.com> <87fv0ajw2d.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Fri, 13 Nov 2015 05:48:11 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TY1PR06CA0037.apcprd06.prod.outlook.com (25.164.91.47) To HK2PR06MB1012.apcprd06.prod.outlook.com (25.161.188.28) X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB1012; 2:UayPaM7NGnXoXTzwF3qcnsfiUpbNjZVVrD2hhIc5oE5tAv//QT3Yp4PxTcHx42Lo4+QFI4Xd8vkZyM6BQD+6B1P++nKSRrnYDr66ebyQ3vsfPuwxnC45MMu5LVpSGMsRW/TYGm2f8/Y1mC5dmJBLAjj6eOol4KMrPoDX+4vkMrY=; 3:3wuGU0C0RTpnZMDQdxcDOD7hYKZnBceOhqLBWYwsGlKIfY4BRBeHWYrmgpFUwsTYTVGf57kvI6E2o1d+xOOUcGQb5sTmZrrXVDwZvR53MBsAWHarb8Pu2lWQHhQCTEzH6kFuX9NRekiu6ahR7GRTqA==; 25:EDs3bvORdZ/B26V7yoF0WQ/1bUhGiIF6H29hgCv97v4TfCmk5qPAE4jGO6c0kO/6fhlaVflXc7S3Mus++ggpoWYmYWHENZuqKV22Z/8Wjmfwa5LA4yCr1SuklUiJaA4mAhNl4BnBpXVY4SLIiy4JaC1cJWxh5l1MFYLG2adG8+sMOpNSqRAOT9iyu/4kWHU/Q7pT6ME9oLsJ8TejueLetBsgiJfRz6GOtkAYYuU96we2T9G7xFI/f/w1md2+XR+hDo+eEvj7Wz53DVxQXJd0sA== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:HK2PR06MB1012; X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB1012; 20:AghHhb8rxxguGkmgZ3+nCXssy+krXiadY7tRD+ISZwxA10jL3cKSXKW6I0JeL80+mpu16nlsRtkYrJyN1N5O2SzgB4BywPOSDEGQMDcImTwxl9U1e6bTrvvC8Wwpcdb3wvX3sF5xu9bRAEhRdsMoZlYVSqE+nIWrdLqltWAGg3RPXgw/1SeZljCuDqeKtmO9ryx6JXsS+9sOUfGXO03CFqkV722G0a4xpF4yPD6KSgDEwTw7vD021XgW05Hafsts0OT6pzP/SvlCYMKkqrS/iea9VTNvEkGta1YQKKwxVl+DU6D3gh/7ycIQo2S/89CbdTMS6aiOqR4AleycER4PKqLEPEYp1BJD3e5B8uw/+5gkvuhsEmn/f38rE8QCWgDI11GUSHhAX1kkGopWcOGMsCAVCCYbGU5V+Okzhuep4ayfK2pg2YKTBYdzIktzXmzJgoI4XBbSP0ZGjfJKkR0l37hg/cWL49tezj719KLwvSBLuVMtPhm+C7VdGn1KtK8w; 4:8hjZMZhCTZQIOzk5CO3kprk6J07QnXPWkN8E7mnBn5NV4sJGJu3zPRlc4/nUSWyYPsJ7XecqEg+EF+ik5k3VRjlWulIIBLYiyqSywOUlXYqQ6s7ZCmF3rmVlIlhDsaGhwvhLgvhgiFhRPhZOtgrxlaq+kKVPIAjEuvdnYSs6JdB7CgpId0F+F+DHtZ5n3qm9FbIL0zuoO4M9Jt7PZxa/IXwDR9KSMVc1DFE+syNHHP0Wu8QU/YmU2edneyk70yxtOmwxA899fUzHifw8QPVROm3xU6cI73/c/8nfBMyvducC2gDVP2HfniBIqvqKyPdNXu8Y8vUTXa2WYc/o0KUPgr4LK3VsEnC4IbQVP5AMa2YMcsTof7w6J+QLnJ4kVAGu X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(85106069007906); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(520078)(8121501046)(5005006)(3002001)(10201501046); SRVR:HK2PR06MB1012; BCL:0; PCL:0; RULEID:; SRVR:HK2PR06MB1012; X-Forefront-PRVS: 0759F7A50A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(189002)(199003)(36756003)(4001350100001)(19580395003)(69596002)(86362001)(229853001)(33646002)(66066001)(50466002)(19580405001)(76176999)(92566002)(46406003)(5008740100001)(101416001)(50986999)(47776003)(106356001)(54356999)(53416004)(23726002)(5004730100002)(77096005)(5007970100001)(2950100001)(83506001)(105586002)(5001920100001)(87976001)(81156007)(5001960100002)(189998001)(110136002)(97736004)(40100003)(122386002)(42186005); DIR:OUT; SFP:1102; SCL:1; SRVR:HK2PR06MB1012; H:morimoto-PC.renesas.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HK2PR06MB1012; 23:PKbNjgc6LOKLRsj7Gu2vFnnTb3nquUBCbtMgo+pOI?= =?us-ascii?Q?CN257Wc/RFVZs6Ck4gGypsoAAmWnR4qlp61Ie6uW7bqidbIBJTO6yV1MshyU?= =?us-ascii?Q?LjKo2/7YjRXRI5lP94z2zalvPITKqVh7fprEUub1IJDRR8kUu2MogHf8RJq2?= =?us-ascii?Q?Ivmp0eGDS/ZievcsCEV4Yqg1LaHEPggzrT7k5frZZhBXLuhDr47iTW2XCApu?= =?us-ascii?Q?aveuUlVmdIsdjrWvakVbCj35/TPaOtf1lgZF8d4Kchvke4OFc7ok5BSN+L6Y?= =?us-ascii?Q?UF5D6uvaSAqbnl5FCc1Ru8h/WhlyYBwY534lFtlmrP/rS6rks0uW9JwzJPnd?= =?us-ascii?Q?d03gMdXoH9lxW5vjkeCTx486/976KOhd/acgtLS5bkkMcqata9hZY8rTeiU8?= =?us-ascii?Q?OlGKEKgolayuTm/g1cEh9ElPGHPclOmuvlS0tFwjXhlA0PK30RD9xOOlZAKU?= =?us-ascii?Q?bFt/5ZIACvXRDucVZkxiRWutAb3hzKyAcAn8CZ3XW5jjH1WBUCJ7lhTRZ1Ui?= =?us-ascii?Q?c0v2ZLeuawH/Eox5wj2A9OdzjmgkcJLly7xbjm3x8PurTjU/C4pagfYwuntd?= =?us-ascii?Q?is+h6TPNu10K6koBmws9ygyU2Ga1hFWkagrx/Pvbd7OcOWSdibg/3U+gM4Pi?= =?us-ascii?Q?bFHn6npkTYnPKPOoT2LP+RInS2xdlpuwG2yReexmPGM/W+UdwEY6xtFDzce5?= =?us-ascii?Q?ypvjaShlZoGS6CT9vmKdA3tEcvX+tX5/8M/Y5epGT16Qgjtd0jtGQufJW90L?= =?us-ascii?Q?hywo+YzvbqJphVMfkJu+jJSIKTcMZk9OTVAb7TbJyuxJExZvPAP8tlf9G60e?= =?us-ascii?Q?IvbKGjPQdsmGNGdlfC+PTS3+rsyDBX5jWY4mQpNSVgU04jNqzXxAUoPI3HfU?= =?us-ascii?Q?vrtWZheSDcQT8wbrXEByBbu14l82YLYMrUSkZlqMHf8DB21oz4Jh/xdBvxzU?= =?us-ascii?Q?BlHqrlXznSM7ZMfGx5EDQIWCnjVbwl5YOeErKoDIaidHgHsuDVBsDmJsT+ih?= =?us-ascii?Q?GWmvgmMvk5VlZH6jsOFDs/qNZfTxZWG+dKPimf5KUAfSmBdCoD2rZOrjUq6H?= =?us-ascii?Q?bLppsL5My1xKc2CGN0bfcVH9hMJ31hQd4hbaSIFFWehI6SBhw=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB1012; 5:OZ3L7iLQOMl2z49cLIWUqZbb7Z+r9j8567YGWMaXsVa6DIF5O00U/NQX5R8euGAav1gN0PMDKeKrAZ3lmy8W+Y8DiRa5QSaKmctDYK9oRmQepBBgoZEUa5UAzzN+i5aEXdZonql0grg6vJ8l51ALMg==; 24:kQd19/A0DDF2YdcZvH4z+nlC+dqiByMLG1LZlHJqyBs1AB/dxNkZxwmn+rPeRNwHPj/nFSf02OOhXrAx/oHgrzqzbB+ySp0Eda4va4FL+P0=; 20:kIWBTwjcawLVN6uNuAG/oEeRFBLFYZzMmvm8ljgiC3aQAiIz9IJVuD/asxjSRNqVgLv6+FR+Zxo8GHNUw3O1+7DqFLSosyhGf0twl7zNOKfboeJzWrBsXnQy/CTXQei3oODjFNXMk38cpj9D4GPYUeKsYm2DBuK6zr478dVznYM= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Nov 2015 05:48:11.7713 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2PR06MB1012 Cc: Linux-ALSA , Simon , Liam Girdwood Subject: [alsa-devel] [PATCH 1/2] ASoC: rsnd: tidyup semantics of rsnd_src_record_error() X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kuninori Morimoto rsnd_src_error_record() should recorde error, but it clears error too. this patch fixes up semantic of rsnd_src_error_record that it records error but doesn't clear error. Otherwise code is confusable. And this patch renames rsnd_src_error_clear() to rsnd_src_status_clear() rsnd_src_error_record() to rsnd_src_record_error() Signed-off-by: Kuninori Morimoto --- sound/soc/sh/rcar/src.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c index c103aa7..4dbdcd8 100644 --- a/sound/soc/sh/rcar/src.c +++ b/sound/soc/sh/rcar/src.c @@ -300,7 +300,7 @@ static void rsnd_src_irq_ctrol(struct rsnd_mod *mod, int enable) rsnd_mod_bset(mod, SCU_SYS_INT_EN1, sys_int_mask, sys_int_val); } -static void rsnd_src_error_clear(struct rsnd_mod *mod) +static void rsnd_src_status_clear(struct rsnd_mod *mod) { u32 val = OUF_SRC(rsnd_mod_id(mod)); @@ -308,7 +308,7 @@ static void rsnd_src_error_clear(struct rsnd_mod *mod) rsnd_mod_bset(mod, SCU_SYS_STATUS1, val, val); } -static bool rsnd_src_error_record(struct rsnd_mod *mod) +static bool rsnd_src_record_error(struct rsnd_mod *mod) { struct rsnd_src *src = rsnd_mod_to_src(mod); u32 val0, val1; @@ -332,9 +332,6 @@ static bool rsnd_src_error_record(struct rsnd_mod *mod) ret = true; } - /* clear error static */ - rsnd_src_error_clear(mod); - return ret; } @@ -383,7 +380,7 @@ static int rsnd_src_init(struct rsnd_mod *mod, rsnd_src_set_convert_rate(io, mod); - rsnd_src_error_clear(mod); + rsnd_src_status_clear(mod); rsnd_src_irq_enable(mod); @@ -434,7 +431,7 @@ static void __rsnd_src_interrupt(struct rsnd_mod *mod, if (!rsnd_io_is_working(io)) goto rsnd_src_interrupt_out; - if (rsnd_src_error_record(mod)) { + if (rsnd_src_record_error(mod)) { dev_dbg(dev, "%s[%d] restart\n", rsnd_mod_name(mod), rsnd_mod_id(mod)); @@ -450,6 +447,7 @@ static void __rsnd_src_interrupt(struct rsnd_mod *mod, rsnd_mod_name(mod), rsnd_mod_id(mod)); } + rsnd_src_status_clear(mod); rsnd_src_interrupt_out: spin_unlock(&priv->lock); }