Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp2893683rwb; Sat, 6 Aug 2022 08:09:43 -0700 (PDT) X-Google-Smtp-Source: AA6agR5am1FR9DVQsmSNdIyLQ3atoSDpNlGacbEgYoobJw4KgTO4pCmDaS/RFsRB0NzBvW9GMMSq X-Received: by 2002:a17:90a:2b42:b0:1f4:fc9a:be32 with SMTP id y2-20020a17090a2b4200b001f4fc9abe32mr20727273pjc.221.1659798582814; Sat, 06 Aug 2022 08:09:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659798582; cv=none; d=google.com; s=arc-20160816; b=yk2ZdyNylJ5E9NBdU8QjIp+dPwZAm3CH27TkpVyoWDN9uPCrSCMf45kiOPkLT5JYnp VSzTB3LlB/vv2z413ySKUw1SjyyoYA0AliyijzA68A6VoZLB5L1s59NwFb/hamoFGec+ 9vAHgTteQRFX/jZH01I6xPI/NJcazq0//JMFWcHdPQQ0vXxZ9O1hMvSsKj5wB8QMVzpF pwUSkj1jfTyCtENRKGLBglUYQLRVkOCMetVCCeqCJ5g3cgkUc2kaIXLSDaVIM7eNPiY7 sioRSYywVWR8gCRuZCuaINMPjtL6rB9CehWKKAeMuSCnSerG7x2eqGuiuvlY20WA6TYo EPxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=yTKIX5JxgA5KMpHPuxVUN1Mx/UxlgP3LqeQilHRv38w=; b=Ud75kuNLNtZMlN9geRPB/d+tYkIOZAaIngLZpQBDTALo8COSuE+iDZMwy3uW0UJS4x PXZPdRJW+d/CzdwC3pl/PZqP67ouwH853w4yj+hAlwrJTHufU8cdjCT1cJ2GYd2H5j/8 /jC6dkeyrE8MhyFQFgDtPudNRQzzwrg1I7EKyxsgDlCxaNPYFTnrQWqa0u9CW2qLe45K FprMUgImUtDghwgZla2lxbuPjMkEWpPj288cz3XRt9gSeq2iXKkH/HAegBhS5pwm2ix6 HqqIxCd7P7QliqgBuf1cVjlXgWGui0EIhh4pIyxJDYGYnZ8A2lyJqiA9zzZ+t86/Zxsl zYhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="HBhEvfP/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mu14-20020a17090b388e00b001f307c637b7si13778058pjb.128.2022.08.06.08.09.26; Sat, 06 Aug 2022 08:09:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="HBhEvfP/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231187AbiHFOpI (ORCPT + 99 others); Sat, 6 Aug 2022 10:45:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230082AbiHFOpH (ORCPT ); Sat, 6 Aug 2022 10:45:07 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C54ECE020; Sat, 6 Aug 2022 07:45:05 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 604776109A; Sat, 6 Aug 2022 14:45:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C8B8DC433D6; Sat, 6 Aug 2022 14:45:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659797104; bh=jEFWSRkjcPJjtn2ZeKa0q1VbeEaRotlPyr2tjOftR/U=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=HBhEvfP/RFNqVewgkGusiDopy4wrLQ5mCcD9MCDGHLlu0B+XCFh5lJGW1AToL36DL 8YncidWabZftcLcAtfHGvVohfZhPkmOZhlcVic2AyhiKBsrAvEQyPpkud5LpPCr1wK tfWJ31ShtFJOzzWM5gPLfEefNtUfJZ8pqb2n3LZCMixdlV0amtn4EMUVDuOVxhrLBP 8JFOoYD3aNc42ObiJG3Pj5C5acBPwH84guQq61bx5n1Gh9GlhdWiWSDJUr+ziRTcDN fA9Mj+nnCGo5J7YWePP+kf3w0Sb6o8lsgBqupY/8OPiycxJoaBX42ijXdnpwItFafi RDV9F9z47hmkA== Date: Sat, 6 Aug 2022 15:55:23 +0100 From: Jonathan Cameron To: Dmitry Rokosov Cc: Andy Shevchenko , "robh+dt@kernel.org" , "stano.jakubek@gmail.com" , "shawnguo@kernel.org" , "lars@metafoo.de" , "stephan@gerhold.net" , "linux-iio@vger.kernel.org" , "devicetree@vger.kernel.org" , kernel , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v4 2/3] iio: add MEMSensing MSA311 3-axis accelerometer driver Message-ID: <20220806155523.37c3e587@jic23-huawei> In-Reply-To: <20220803191621.tzrmndkygfe7nlpx@CAB-WSD-L081021.sigma.sbrf.ru> References: <20220803131132.19630-1-ddrokosov@sberdevices.ru> <20220803131132.19630-3-ddrokosov@sberdevices.ru> <20220803191621.tzrmndkygfe7nlpx@CAB-WSD-L081021.sigma.sbrf.ru> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > [...] > > > > + return dev_err_probe(dev, err, "cannot enable push-pull int\n"); > > > > interrupt > > It will be more ugly due 80 symbols restriction. These days we let that stretch a little for cases like these. > > > > + indio_dev->modes = 0; /* setup buffered mode later */ > > > > Why explicit assignment to 0? Doesn't kzalloc() do it for you? > > kzalloc() will do it for me, of course. Previously, I initialized modes to > INDIO_DIRECT_MODE to just provide default value for that. Jonathan > suggested to replace it with 0. I did? I wonder what I was smoking that day. Should be set to INDIO_DIRECT_MODE as you had it previously. (From what I recall it will work either way but we have in the past had core code that checked this and may do again in the future so drivers should still be setting it to specify they provide sysfs interfaces to directly read the channels). > I can remove this line at all, no problem. > I just thought, it's more readable.