Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp2111922ima; Thu, 25 Oct 2018 09:42:05 -0700 (PDT) X-Google-Smtp-Source: AJdET5cxYKYPkeNjP1hIIS4KFyp8+W0+dTQNf93Q0uszvq9ZGpYiBxmbG5yyeVpAANywQ9oj0jxH X-Received: by 2002:a63:2218:: with SMTP id i24-v6mr2145735pgi.238.1540485725789; Thu, 25 Oct 2018 09:42:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540485725; cv=none; d=google.com; s=arc-20160816; b=sUPgoU8kdpKWnvr/WnJvyCCpY1bFsBNngcxj2fx1o+ivfWQai2JWlxaNWEW+HraMca 8JVZEnNiEcv9bhjMIQrrgHj9Xypoz4Khe434/3awzdQ7F2S272ofPnqshRjktuEATiex vQgUNomQdguRrD2aDej4RiTnKWc5pJPueW+GL+O23DKU4nsqvyxagWmQqqKE3zGXg6Cg 9he7eSN8R/WtVejCxRlzehmgA2zX7PrnT+PbWyPtrtlygWROZHWI5k+QwAOuMl13/mMn xe8FfMx2t17ExIMcVvxzBXyauTuqGEa0b7iM+AJ8qkmQCxFa+6m9j57/d4//dgZulH58 X72Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dmarc-filter:dkim-signature:dkim-signature; bh=y0RxezAqGwsjcFzrUTvV6eC+LdJf1cEND0VJKcwlnmA=; b=GBABhTvlbUWkX27RCjY1H3wa+m38FvI0kBuMzwznVBKOyIfgeq9TMwyXq+y2rFGjfw /ZvoVpYFBo1wYGi5IZsNX6AyqpYT0CTImEIOH5RzdthFeySVan2/sNiI8fgylAYXXJ4M kHfnCEYftjyitWsxUI7EiSt23MAxvHyCrKysFiM2YUB6OfkXWw+HzWcaIOWOR56XYNBO odJ4jMtyEt6UrUB8hREYo9aM2OlYKsNeHRFbvZGIbtnpPoVjYbf7oayTgFWW60KkpsJM sRoWYKO9a9/vTtFRaxeOCxrQT5qgkZw0FZTp9AI22RzsNry6jLpvme/H33r7zq1D8LcY lFAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b="kdAw+vi/"; dkim=pass header.i=@codeaurora.org header.s=default header.b=M4fMqiP2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e184-v6si8905533pfa.206.2018.10.25.09.41.32; Thu, 25 Oct 2018 09:42:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b="kdAw+vi/"; dkim=pass header.i=@codeaurora.org header.s=default header.b=M4fMqiP2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727946AbeJZBOY (ORCPT + 99 others); Thu, 25 Oct 2018 21:14:24 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:39504 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727363AbeJZBOY (ORCPT ); Thu, 25 Oct 2018 21:14:24 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 3369660C1B; Thu, 25 Oct 2018 16:40:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1540485650; bh=Mw3CQWac6GyP5PPd+3EhkAawTJMCncA95D1YTxzc64k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kdAw+vi/Mz4qXh1f7g9MM36sKdup8mlWhBTZJQf/so0iocHTUxb6d0pstWGdrRcv1 mskVrEQ6OyYyzXGmmZMfmGk4mcZxIAAPBT9hN75AxMu8clLYrTGEhotKAFqrGDfi1w d0Cc4Xw0xuXFo2LZBtF/JZT0x+QGZSWOCUCXq1rI= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from alokc-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: alokc@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 5463560C1B; Thu, 25 Oct 2018 16:40:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1540485649; bh=Mw3CQWac6GyP5PPd+3EhkAawTJMCncA95D1YTxzc64k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M4fMqiP2kGJpvLlOifm1RlHfZ/p6Ye0x5iIleP5ZQs2ZS4bApCZIzoZDbunC/dI8w cu6rpGIp+WDxEfAXI5r3uBunaAluntwYgy9Dg/7wkFQwIh1XwLxC50xWohp6+gP7AE EzWX3VLMivV6lJedoOjhYoes7W/yj02RrXS669pw= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 5463560C1B Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=alokc@codeaurora.org From: Alok Chauhan To: swboyd@chromium.org, dianders@chromium.org, Mark Brown , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, Alok Chauhan Subject: [PATCH 1/2] spi: spi-geni-qcom: fix nitpicks Date: Thu, 25 Oct 2018 22:10:28 +0530 Message-Id: <1540485629-5970-2-git-send-email-alokc@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1540485629-5970-1-git-send-email-alokc@codeaurora.org> References: <1540485629-5970-1-git-send-email-alokc@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org fixed the nitpicks. Signed-off-by: Alok Chauhan --- drivers/spi/spi-geni-qcom.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/spi/spi-geni-qcom.c b/drivers/spi/spi-geni-qcom.c index 6432ecc..d1830fb 100644 --- a/drivers/spi/spi-geni-qcom.c +++ b/drivers/spi/spi-geni-qcom.c @@ -64,15 +64,13 @@ #define TIMESTAMP_AFTER BIT(3) #define POST_CMD_DELAY BIT(4) -/* SPI M_COMMAND OPCODE */ -enum spi_mcmd_code { +enum spi_m_cmd_opcode { CMD_NONE, CMD_XFER, CMD_CS, CMD_CANCEL, }; - struct spi_geni_master { struct geni_se se; struct device *dev; @@ -87,7 +85,7 @@ struct spi_geni_master { struct completion xfer_done; unsigned int oversampling; spinlock_t lock; - unsigned int cur_mcmd; + enum spi_m_cmd_opcode cur_mcmd; int irq; }; @@ -129,7 +127,7 @@ static void spi_geni_set_cs(struct spi_device *slv, bool set_flag) struct spi_geni_master *mas = spi_master_get_devdata(slv->master); struct spi_master *spi = dev_get_drvdata(mas->dev); struct geni_se *se = &mas->se; - unsigned long timeout; + unsigned long time_left; reinit_completion(&mas->xfer_done); pm_runtime_get_sync(mas->dev); @@ -142,8 +140,8 @@ static void spi_geni_set_cs(struct spi_device *slv, bool set_flag) else geni_se_setup_m_cmd(se, SPI_CS_DEASSERT, 0); - timeout = wait_for_completion_timeout(&mas->xfer_done, HZ); - if (!timeout) + time_left = wait_for_completion_timeout(&mas->xfer_done, HZ); + if (!time_left) handle_fifo_timeout(spi, NULL); pm_runtime_put(mas->dev); @@ -485,7 +483,6 @@ static irqreturn_t geni_spi_isr(int irq, void *data) struct geni_se *se = &mas->se; u32 m_irq; unsigned long flags; - irqreturn_t ret = IRQ_HANDLED; if (mas->cur_mcmd == CMD_NONE) return IRQ_NONE; @@ -533,7 +530,7 @@ static irqreturn_t geni_spi_isr(int irq, void *data) writel(m_irq, se->base + SE_GENI_M_IRQ_CLEAR); spin_unlock_irqrestore(&mas->lock, flags); - return ret; + return IRQ_HANDLED; } static int spi_geni_probe(struct platform_device *pdev) -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project