Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp560840imm; Sat, 14 Jul 2018 07:04:25 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd58nB7H9nCRkSfJ/cng75NHJ/J27wtr65ugwQqiFXVSqxhUmmhgCd50t+7paI5bxBVPLXF X-Received: by 2002:a65:6104:: with SMTP id z4-v6mr9586378pgu.361.1531577065486; Sat, 14 Jul 2018 07:04:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531577065; cv=none; d=google.com; s=arc-20160816; b=rR5oN9hmSyJLBHPkR2u2UP5EZ6VfzMY5FZflWncWBW6UltPZ3XKSr0vjDMJsSAlosY iYfkqJlg50eJ9QUqwvHT6eal75tn6zxb2XQAuYx2K1Ng8R8stLrdyBKUp7hgL7knT2wV 3t/7T/WJcresKZIxr6+hk3fyZNdsXkqjUsmhCvwYvppVO0ohE8wgZEXQI4ZgGylzioGs prUdHwjFkQ2ppJqax6MH78ygYI6uwQPj/115CSr63AXE1V5JgrRt+6/n6goqGXS/XFEd umN8eO4uwRmwC1QOd6Rm5YlcEDWdhxoCDTZrIi3vt8ISui7ZZrT9a5qfP0daixH6JbkL oUhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=Kmxb+fQcD1qCfuD01NiLvlAf3n8JrOYpEcn2X9ImgUs=; b=jDLSzZJf8TX3DAmefb7GtFggteBIrsKOuB59fp5d/0xjLAtbpKwi8QSPJ1CTbrLKaJ BOc6t9H5xS3txd5Nts1SQQIUGfNZVxTUecK3ZKTG1wk1SdBEkRqRRTD8nQB+zdFiqoUR lN4oADa54oX4lLyl5+6isKVgbxQDo9nH8K+ZdIVeRdB9DZQRJd792upgp+GyjcwcQZEh SQez/LuUfUoqvkywgNQFPeFQBdptYttDhqz2sNdgfUloQYHLCw1J0JeNO5F62gMeLrgU fN3H9T9Ck5WZZv9R0G2gwFPuiA7jVp6yMeqiO226HYnr1tEy4RT/cG14dnff8UI0OJuI nC8Q== ARC-Authentication-Results: i=1; mx.google.com; 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 p2-v6si86510pli.289.2018.07.14.07.03.57; Sat, 14 Jul 2018 07:04:25 -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; 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 S1727439AbeGNOWN (ORCPT + 99 others); Sat, 14 Jul 2018 10:22:13 -0400 Received: from www381.your-server.de ([78.46.137.84]:42178 "EHLO www381.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726979AbeGNOWM (ORCPT ); Sat, 14 Jul 2018 10:22:12 -0400 Received: from [78.46.172.2] (helo=sslproxy05.your-server.de) by www381.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.85_2) (envelope-from ) id 1feL8P-0001hb-0g; Sat, 14 Jul 2018 16:02:53 +0200 Received: from [188.174.124.159] (helo=[192.168.178.33]) by sslproxy05.your-server.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1feL8O-0000Z5-IV; Sat, 14 Jul 2018 16:02:52 +0200 Subject: =?UTF-8?Q?Re:_[PATCH_1/2]_mux:adgs1408/1409:_New_driver_for_Analog_?= =?UTF-8?Q?Devices_ADGS1408/1409_mux_=e2=80=a6?= To: Peter Rosin , Mircea Caprioru Cc: davem@davemloft.net, mchehab+samsung@kernel.org, akpm@linux-foundation.org, rdunlap@infradead.org, linux-kernel@vger.kernel.org References: <20180713122738.5888-1-mircea.caprioru@analog.com> From: Lars-Peter Clausen Message-ID: <059d9750-8715-bc4e-185f-d52b48ad9b59@metafoo.de> Date: Sat, 14 Jul 2018 16:02:51 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: lars@metafoo.de X-Virus-Scanned: Clear (ClamAV 0.100.0/24752/Sat Jul 14 14:53:17 2018) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/14/2018 02:04 PM, Peter Rosin wrote: [...] >> +static int adgs140x_spi_reg_write(struct spi_device *spi, >> + u8 reg_addr, u8 reg_data) >> +{ >> + u8 tx_buf[2]; >> + >> + tx_buf[0] = reg_addr; >> + tx_buf[1] = reg_data; >> + >> + return spi_write_then_read(spi, tx_buf, sizeof(tx_buf), NULL, 0); > > return spi_write(spi, tx_buf, sizeof(tx_buf)); Be aware spi_write_then_read() can handle on stack buffers, spi_write() can't.