Received: by 10.223.185.116 with SMTP id b49csp2322123wrg; Thu, 22 Feb 2018 11:47:42 -0800 (PST) X-Google-Smtp-Source: AH8x227zKQfKZv+VHaJbP2AmADHkDgZoZBncqch5XrAEpt96zIJnkRh88fk7COi66/kWpT3ea4k3 X-Received: by 10.101.72.199 with SMTP id o7mr3858962pgs.303.1519328862752; Thu, 22 Feb 2018 11:47:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519328862; cv=none; d=google.com; s=arc-20160816; b=CGjzTz0dP7HdJhf9VlfThioS1rtz3wXP+72hurnNXv4Xf1oNp3oTPoxa5C0kr4RAiI PKFjWQ8ukQrDYVQWGbGfkRhf0B+zi5oNsTiGQWsZU2c0vMpsExIGlFIf4GKqMEWKbN49 b3LWtWFf/DyHqEAHrLlcRieE1kPPAUJsKlyaV6VgO8CHC2Nv3T7Z/xqnGrkMHneLHYbG eYgZGbpgsexsSeli2WBoaRhUGsskhVpRTEBCcbtVggCklWIgwilLvv9C5ssthaEXEEQ3 UwveNZ3QSLE0nxk2GlCzwFBi05WypotfqJhcKb1BZOaIv8JYFOQ+ebJtniMf/w68Ita/ X+IQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:message-id:date:subject:cc:from :dkim-signature:arc-authentication-results; bh=gzinpuY00bH3A0Cmsf6E6hcaM0ND4BFHibR7zedFydo=; b=Mi76ObHLrrKFQozxpqfJea+0t2SU812W52K8DYN1UqPtbvaeP3TYs31hkQE+QRCU4Q r3HwHxHDe8O+EoAnvCjK8mBQEtPWvluz4oppVHRUSSuvpgtHOi4MZPJfu1rDqDwnA2hv xHe39ARpiiXpkaGrRC86ELocBee2o1RRtw3ECbWO3/BqQlYQsDD79vtPwd9dT3jDEK2W 0wsFQgc92BKiqIHMt9pq+KWN52iZuV/Mtowp+kBcgoKOMMcIcG7fwFc55gH5ql0IR/Vj BNRMTFdmk08JJCWbWB7nPaLpCQuM1stg4uYEl231eCmYzklDQbdUJ7qjolxtTxyIyZZU IS3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=eY/wVNxD; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d4si419315pgq.337.2018.02.22.11.47.27; Thu, 22 Feb 2018 11:47:42 -0800 (PST) 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=fail header.i=@gmail.com header.s=20161025 header.b=eY/wVNxD; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751457AbeBVTq2 (ORCPT + 99 others); Thu, 22 Feb 2018 14:46:28 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:34073 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750967AbeBVTq0 (ORCPT ); Thu, 22 Feb 2018 14:46:26 -0500 Received: by mail-pg0-f68.google.com with SMTP id m19so2410916pgn.1; Thu, 22 Feb 2018 11:46:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=gzinpuY00bH3A0Cmsf6E6hcaM0ND4BFHibR7zedFydo=; b=eY/wVNxDXlFB9YvQeDDgkR3sAATJlsO0pdWTCHcJyt6ITGx5CFiHBHmHt2srsniDxk RyVcl3bEWlRDcdwWWtjaQWT0uguyeJKGOEcbYirPAWVGoqAxYllYvZ4wHGvyAA6Wz5BB MmjJ2FwMB66slNZhbVbpRsEQI3l0js5YXbKw2DEdLSOuIFa7LiCSmbxCmcyoftl/KQu3 x0KGg3OXZe1Boe3JtKWIc8zVpTfc5NFjHCTAEvLblUN0Vz9r/7pz3eVcJTcKAsqhdgaJ r59/qUZNQXpmz2FKehEf6FZ4PvCkbN5URTOwghNQWzmdFXiyw7ojHEL/dsFptTxVbZBp KJxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=gzinpuY00bH3A0Cmsf6E6hcaM0ND4BFHibR7zedFydo=; b=uf0kfgUCkosHGOSyqcUxkeQ6uS7Dm1zq2iRJ0hlAHtCJX9sogKHH2tVxkrJ4VFS4kp BH48KtAz0MWtSS+zx9wf9xLSPydMmCLrpquqkHeAscaaF5IaKdmwSxIyAQ6fUrdWfRCJ pjhqo0O/DMBX1ngcCgUGkdJ3m8IaQix81edyUfM9iotuerd+PUmXOZ6rd34hC5JEubbq WLNOppD1ReOdnzfK1lvrQTyHGj7m5Yd+ccUaCC+q6abvVv45iefM1bvT+ggVVjcokxau MYzZRjUx3WQthRdrlvJKaU88C7HQfKTWzzTh/BrNf1bDywDeTULVCcuDbQiFU657F2Ms dAFw== X-Gm-Message-State: APf1xPBE3stZ6TRHPrQYjeyM5+sWyuxkAPyrtF91w3vCC/DvjtCzQ/P5 Za3v1Im5f+2D6RCQoEZ8M/k= X-Received: by 10.99.152.10 with SMTP id q10mr6687236pgd.212.1519328786159; Thu, 22 Feb 2018 11:46:26 -0800 (PST) Received: from localhost.localdomain (node-4m8.pool-118-173.dynamic.totbb.net. [118.173.23.96]) by smtp.gmail.com with ESMTPSA id v186sm1254397pfb.5.2018.02.22.11.46.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Feb 2018 11:46:25 -0800 (PST) From: Alexey Roslyakov Cc: alexey.roslyakov@gmail.com, Jaehoon Chung , Ulf Hansson , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] mmc: dw_mmc: update kernel-doc comments for dw_mci Date: Fri, 23 Feb 2018 02:45:25 +0700 Message-Id: <20180222194525.28947-1-alexey.roslyakov@gmail.com> X-Mailer: git-send-email 2.16.1 To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org cur_slot and num_slots has been removed from struct dw_mci in 42f989c002f2. Unfortunately, inline documentation was not updated so far. Fix @lock field documentation in Locking section. Move @mrq field of struct dw_mci_slot mention closer to it description, so no one could miss this slightest detail. Couple of code style fixes as a bonus. Signed-off-by: Alexey Roslyakov --- drivers/mmc/host/dw_mmc.h | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/drivers/mmc/host/dw_mmc.h b/drivers/mmc/host/dw_mmc.h index e3124f06a47e..451bc0862493 100644 --- a/drivers/mmc/host/dw_mmc.h +++ b/drivers/mmc/host/dw_mmc.h @@ -65,8 +65,7 @@ struct dw_mci_dma_slave { * @fifo_reg: Pointer to MMIO registers for data FIFO * @sg: Scatterlist entry currently being processed by PIO code, if any. * @sg_miter: PIO mapping scatterlist iterator. - * @cur_slot: The slot which is currently using the controller. - * @mrq: The request currently being processed on @cur_slot, + * @mrq: The request currently being processed on @slot, * or NULL if the controller is idle. * @cmd: The command currently being sent to the card, or NULL. * @data: The data currently being transferred, or NULL if no data @@ -102,7 +101,6 @@ struct dw_mci_dma_slave { * @bus_hz: The rate of @mck in Hz. This forms the basis for MMC bus * rate and timeout calculations. * @current_speed: Configured rate of the controller. - * @num_slots: Number of slots available. * @fifoth_val: The value of FIFOTH register. * @verid: Denote Version ID. * @dev: Device associated with the MMC controller. @@ -134,17 +132,17 @@ struct dw_mci_dma_slave { * ======= * * @lock is a softirq-safe spinlock protecting @queue as well as + * @slot, @mrq and @state. These must always be updated * at the same time while holding @lock. + * The @mrq field of struct dw_mci_slot is also protected by @lock, + * and must always be written at the same time as the slot is added to + * @queue. * * @irq_lock is an irq-safe spinlock protecting the INTMASK register * to allow the interrupt handler to modify it directly. Held for only long * enough to read-modify-write INTMASK and no other locks are grabbed when * holding this one. * - * The @mrq field of struct dw_mci_slot is also protected by @lock, - * and must always be written at the same time as the slot is added to - * @queue. - * * @pending_events and @completed_events are accessed using atomic bit * operations, so they don't need any locking. * @@ -321,8 +319,8 @@ struct dw_mci_board { #define SDMMC_ENABLE_SHIFT 0x110 #define SDMMC_DATA(x) (x) /* -* Registers to support idmac 64-bit address mode -*/ + * Registers to support idmac 64-bit address mode + */ #define SDMMC_DBADDRL 0x088 #define SDMMC_DBADDRU 0x08c #define SDMMC_IDSTS64 0x090 @@ -449,7 +447,8 @@ struct dw_mci_board { (SDMMC_CTRL_RESET | SDMMC_CTRL_FIFO_RESET | SDMMC_CTRL_DMA_RESET) /* FIFO register access macros. These should not change the data endian-ness - * as they are written to memory to be dealt with by the upper layers */ + * as they are written to memory to be dealt with by the upper layers + */ #define mci_fifo_readw(__reg) __raw_readw(__reg) #define mci_fifo_readl(__reg) __raw_readl(__reg) #define mci_fifo_readq(__reg) __raw_readq(__reg) -- 2.16.1