Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

crypto: s5p-sss - Use consistent indentation for variables and members

Bring some consistency by:
1. Replacing fixed-space indentation of structure members with just
tabs.
2. Remove indentation in declaration of local variable between type and
name. Driver was mixing usage of such indentation and lack of it.
When removing indentation, reorder variables in
reversed-christmas-tree order with first variables being initialized
ones.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Krzysztof Kozlowski and committed by
Herbert Xu
5318c53d 4f8de65b

+40 -40
+40 -40
drivers/crypto/s5p-sss.c
··· 155 155 * expansion of its usage. 156 156 */ 157 157 struct samsung_aes_variant { 158 - unsigned int aes_offset; 158 + unsigned int aes_offset; 159 159 }; 160 160 161 161 struct s5p_aes_reqctx { 162 - unsigned long mode; 162 + unsigned long mode; 163 163 }; 164 164 165 165 struct s5p_aes_ctx { 166 - struct s5p_aes_dev *dev; 166 + struct s5p_aes_dev *dev; 167 167 168 - uint8_t aes_key[AES_MAX_KEY_SIZE]; 169 - uint8_t nonce[CTR_RFC3686_NONCE_SIZE]; 170 - int keylen; 168 + uint8_t aes_key[AES_MAX_KEY_SIZE]; 169 + uint8_t nonce[CTR_RFC3686_NONCE_SIZE]; 170 + int keylen; 171 171 }; 172 172 173 173 struct s5p_aes_dev { 174 - struct device *dev; 175 - struct clk *clk; 176 - void __iomem *ioaddr; 177 - void __iomem *aes_ioaddr; 178 - int irq_fc; 174 + struct device *dev; 175 + struct clk *clk; 176 + void __iomem *ioaddr; 177 + void __iomem *aes_ioaddr; 178 + int irq_fc; 179 179 180 - struct ablkcipher_request *req; 181 - struct s5p_aes_ctx *ctx; 182 - struct scatterlist *sg_src; 183 - struct scatterlist *sg_dst; 180 + struct ablkcipher_request *req; 181 + struct s5p_aes_ctx *ctx; 182 + struct scatterlist *sg_src; 183 + struct scatterlist *sg_dst; 184 184 185 185 /* In case of unaligned access: */ 186 - struct scatterlist *sg_src_cpy; 187 - struct scatterlist *sg_dst_cpy; 186 + struct scatterlist *sg_src_cpy; 187 + struct scatterlist *sg_dst_cpy; 188 188 189 - struct tasklet_struct tasklet; 190 - struct crypto_queue queue; 191 - bool busy; 192 - spinlock_t lock; 189 + struct tasklet_struct tasklet; 190 + struct crypto_queue queue; 191 + bool busy; 192 + spinlock_t lock; 193 193 194 - struct samsung_aes_variant *variant; 194 + struct samsung_aes_variant *variant; 195 195 }; 196 196 197 197 static struct s5p_aes_dev *s5p_dev; ··· 421 421 static irqreturn_t s5p_aes_interrupt(int irq, void *dev_id) 422 422 { 423 423 struct platform_device *pdev = dev_id; 424 - struct s5p_aes_dev *dev = platform_get_drvdata(pdev); 425 - uint32_t status; 426 - unsigned long flags; 427 - bool set_dma_tx = false; 428 - bool set_dma_rx = false; 424 + struct s5p_aes_dev *dev = platform_get_drvdata(pdev); 425 + bool set_dma_tx = false; 426 + bool set_dma_rx = false; 427 + unsigned long flags; 428 + uint32_t status; 429 429 430 430 spin_lock_irqsave(&dev->lock, flags); 431 431 ··· 538 538 539 539 static void s5p_aes_crypt_start(struct s5p_aes_dev *dev, unsigned long mode) 540 540 { 541 - struct ablkcipher_request *req = dev->req; 542 - uint32_t aes_control; 543 - int err; 544 - unsigned long flags; 541 + struct ablkcipher_request *req = dev->req; 542 + uint32_t aes_control; 543 + unsigned long flags; 544 + int err; 545 545 546 546 aes_control = SSS_AES_KEY_CHANGE_MODE; 547 547 if (mode & FLAGS_AES_DECRYPT) ··· 653 653 654 654 static int s5p_aes_crypt(struct ablkcipher_request *req, unsigned long mode) 655 655 { 656 - struct crypto_ablkcipher *tfm = crypto_ablkcipher_reqtfm(req); 657 - struct s5p_aes_ctx *ctx = crypto_ablkcipher_ctx(tfm); 658 - struct s5p_aes_reqctx *reqctx = ablkcipher_request_ctx(req); 659 - struct s5p_aes_dev *dev = ctx->dev; 656 + struct crypto_ablkcipher *tfm = crypto_ablkcipher_reqtfm(req); 657 + struct s5p_aes_reqctx *reqctx = ablkcipher_request_ctx(req); 658 + struct s5p_aes_ctx *ctx = crypto_ablkcipher_ctx(tfm); 659 + struct s5p_aes_dev *dev = ctx->dev; 660 660 661 661 if (!IS_ALIGNED(req->nbytes, AES_BLOCK_SIZE)) { 662 662 dev_err(dev->dev, "request size is not exact amount of AES blocks\n"); ··· 671 671 static int s5p_aes_setkey(struct crypto_ablkcipher *cipher, 672 672 const uint8_t *key, unsigned int keylen) 673 673 { 674 - struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher); 674 + struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher); 675 675 struct s5p_aes_ctx *ctx = crypto_tfm_ctx(tfm); 676 676 677 677 if (keylen != AES_KEYSIZE_128 && ··· 763 763 764 764 static int s5p_aes_probe(struct platform_device *pdev) 765 765 { 766 - int i, j, err = -ENODEV; 767 - struct s5p_aes_dev *pdata; 768 - struct device *dev = &pdev->dev; 769 - struct resource *res; 766 + struct device *dev = &pdev->dev; 767 + int i, j, err = -ENODEV; 770 768 struct samsung_aes_variant *variant; 769 + struct s5p_aes_dev *pdata; 770 + struct resource *res; 771 771 772 772 if (s5p_dev) 773 773 return -EEXIST;