public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Kosta Zertsekel <zertsekel@gmail.com>
Cc: "Mark Brown" <broonie@kernel.org>,
	linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Jan Kundrát" <jan.kundrat@cesnet.cz>,
	"Stefan Roese" <sr@denx.de>,
	"Ken Wilson" <ken.wilson@opengear.com>
Subject: Re: [PATCH] spi: orion: cosmetics - alias long direct_access variables
Date: Mon, 6 Aug 2018 21:09:12 +0200	[thread overview]
Message-ID: <20180806190912.GJ9372@lunn.ch> (raw)
In-Reply-To: <20180806185158.2382-1-zertsekel@gmail.com>

> @@ -683,6 +683,7 @@ static int orion_spi_probe(struct platform_device *pdev)
>  
>  	/* Scan all SPI devices of this controller for direct mapped devices */
>  	for_each_available_child_of_node(pdev->dev.of_node, np) {
> +		struct orion_direct_acc *dacc;

I would prefer direct_access, but it looks like this is too long to
put the devm_ioremap on one line. But it should be enough to fix the
odd indentation of r->start and PAGE_SIZE.

    Andrew

>  		u32 cs;
>  
>  		/* Get chip-select number from the "reg" property */
> @@ -711,14 +712,13 @@ static int orion_spi_probe(struct platform_device *pdev)
>  		 * This needs to get extended for the direct SPI-NOR / SPI-NAND
>  		 * support, once this gets implemented.
>  		 */
> -		spi->child[cs].direct_access.vaddr = devm_ioremap(&pdev->dev,
> -							    r->start,
> -							    PAGE_SIZE);
> -		if (!spi->child[cs].direct_access.vaddr) {
> +		dacc = &spi->child[cs].direct_access;
> +		dacc->vaddr = devm_ioremap(&pdev->dev, r->start, PAGE_SIZE);
> +		if (!dacc->vaddr) {
>  			status = -ENOMEM;
>  			goto out_rel_axi_clk;
>  		}
> -		spi->child[cs].direct_access.size = PAGE_SIZE;
> +		dacc->size = PAGE_SIZE;
>  
>  		dev_info(&pdev->dev, "CS%d configured for direct access\n", cs);
>  	}
> -- 
> 2.17.1
> 

  reply	other threads:[~2018-08-06 19:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-06 18:51 [PATCH] spi: orion: cosmetics - alias long direct_access variables Kosta Zertsekel
2018-08-06 19:09 ` Andrew Lunn [this message]
2018-08-06 19:27   ` Kosta Zertsekel

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=20180806190912.GJ9372@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=broonie@kernel.org \
    --cc=jan.kundrat@cesnet.cz \
    --cc=ken.wilson@opengear.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=sr@denx.de \
    --cc=zertsekel@gmail.com \
    /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