Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp10591061rwp; Fri, 21 Jul 2023 01:28:34 -0700 (PDT) X-Google-Smtp-Source: APBJJlEt7CpaT6lFvnT4AwMldQDlSdQSE3s3Up3C382PD8fPb1DJhmdT8cv6rTG+fxmG92pZ1gF9 X-Received: by 2002:aca:170b:0:b0:3a4:316b:42c7 with SMTP id j11-20020aca170b000000b003a4316b42c7mr1315312oii.2.1689928114538; Fri, 21 Jul 2023 01:28:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689928114; cv=none; d=google.com; s=arc-20160816; b=wetrMWebY5LaYkj8cp+I/2JEy0JzWAZM9eLU2f8Q2C6XIy4FnCI1rylWv4R7WLyhP/ VgE4KxtaWTr3H/tfLBYQmB+SOnX92pr2M7SA6VAuRI0UgatanGkbFr8pzQqLdmrhx44t y+5HgUsmSPNdzZFYvUM6QyOBWOvS86G890MXugz1I3j5CSZFpJKWktdWklZZPNodpRju 5EelU7gDatY7yGJDcC5A5d1vqCi8oWndTLdPSbXLrlxYklr7sKj/wZRjB9+TVlldqjrY 5t8qtEgoVn3sPxUkCA3p6a1aCVJ5sG4R33LlVmzfNYoEvWLD0qyWSOzW6SSdF5ytzinS sSXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=e0zBWA0NVDhnM9CNqFrp3Ce071wFVa/Nrr4Nyq3P2rI=; fh=a2LQsJbft13zZi1EMKa3RYwt0yCIgJr4Ogwikqtm9z0=; b=k3FW7oZ5AXDIbyev6uLWgGhak3kFL29CtGKAn9t4skW1jTRcrfqR7dhDJBgGocgT5u NFilXwuk9WUnQ5C3OJiG8N2aWhPa8P6lxy/1e4MqyCW/8gcGILjLbOVPtBuu78HEKYmI 3OU+8ccBYl9XyF5h2zmfGdoz8pbeEsv/6w4JD1UDlyRvADzyJ2bt/NqhSW1PByZcay1C ys0OkGJTq5SQA3S+OGaUbPytIuyJFpy+NWxjdvadlUnmQEdIPfo1cDhYAUNbXTM8vm/W qaO5qAkHV5GlxqqZkbxDOxnvpfXlf9vy+bU/khV4iPUDLQ2j4gst3XO0JYIqJnf0fuXj OtAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=AbO4XSFW; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l186-20020a6388c3000000b005577eec6c6csi2463471pgd.160.2023.07.21.01.28.22; Fri, 21 Jul 2023 01:28:34 -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=@gmail.com header.s=20221208 header.b=AbO4XSFW; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230072AbjGUH5M (ORCPT + 99 others); Fri, 21 Jul 2023 03:57:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229911AbjGUH5K (ORCPT ); Fri, 21 Jul 2023 03:57:10 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58945272D; Fri, 21 Jul 2023 00:57:09 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-9891c73e0fbso351454366b.1; Fri, 21 Jul 2023 00:57:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689926228; x=1690531028; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=e0zBWA0NVDhnM9CNqFrp3Ce071wFVa/Nrr4Nyq3P2rI=; b=AbO4XSFWGc+VGxFBz1Sfy7P48ZyfgPe8lX+DyWVX8m7/C4VNn50dob7TZD+uvb6mAj 9Wh/ZV0pB1sf3mKPKjDKTCPqB65CPRRiBNQx/5oCY52A3MwE//tgNgyMCm4osNF6/Wlc FHUvRCq+6oJyxGrJJJzRvCR7npCMOc6Qk5CGF5af14ZB5lBxIzsGdXT7W4nwUcCF5ACC YHlalj9kRRnBWuRkqOt2gqkZv1gWUS2rSViZvxZepxnNOESxk3ecrTQ7yrNCL4NPO9oU GCGNYAQ4miZ3FtIZE34hUkZihK5CFQh3YWksl6cXXM2W6QjiYOoDgln2jwCpNzWRS/JI h7cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689926228; x=1690531028; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=e0zBWA0NVDhnM9CNqFrp3Ce071wFVa/Nrr4Nyq3P2rI=; b=lQOFOI/p3/eCBccMm5CHp/1CcpSvdURdCM5CUIQk7XgV2XGgtYw2TMj9OdbTXDbZUN 4lhanmOqk/lMWRX0to+8BtwHx85IDrWoz+2wFu8DGphLD0vY7T2qkIzACzI9Aq4MtVDz kAncVkQabkrFxzOyqi4nlO8igfL27bPT0jCgffFvNJeq7e4nxxkEAa9DiLHfHyBVkQUJ +xeyiGt0r+XoJig++GisqVi81rXlABNGRX0dQUCkpX+auvwUrav+RNssXikffruyF5IP lSMMk6R1i/YEC+fUnwM0QCNrvYSzKT4taZ6Kd5wGFFE6OXK+DvtRhHfD810xdtAq0+8t u2XA== X-Gm-Message-State: ABy/qLbUVaq7J/KKSGQKDqgaWbBBf8NdYNAv76+qsSP4BnnwhOHcqCic bMweKoa7V11j335/v/KhUak= X-Received: by 2002:a17:906:5d12:b0:993:e85c:4ad6 with SMTP id g18-20020a1709065d1200b00993e85c4ad6mr7895345ejt.7.1689926227507; Fri, 21 Jul 2023 00:57:07 -0700 (PDT) Received: from ?IPv6:2003:f6:ef05:8700:f946:69a3:7954:9ee0? (p200300f6ef058700f94669a379549ee0.dip0.t-ipconnect.de. [2003:f6:ef05:8700:f946:69a3:7954:9ee0]) by smtp.gmail.com with ESMTPSA id kk7-20020a170907766700b0098df7d0e096sm1808001ejc.54.2023.07.21.00.57.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jul 2023 00:57:07 -0700 (PDT) Message-ID: <65dbc603062018e1cd968caf983512c2cb2039e5.camel@gmail.com> Subject: Re: [PATCH v1 3/8] iio: core: Switch to krealloc_array() From: Nuno =?ISO-8859-1?Q?S=E1?= To: Andy Shevchenko , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jonathan Cameron , Lars-Peter Clausen Date: Fri, 21 Jul 2023 09:59:37 +0200 In-Reply-To: <20230720205324.58702-4-andriy.shevchenko@linux.intel.com> References: <20230720205324.58702-1-andriy.shevchenko@linux.intel.com> <20230720205324.58702-4-andriy.shevchenko@linux.intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: base64 User-Agent: Evolution 3.48.4 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,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 T24gVGh1LCAyMDIzLTA3LTIwIGF0IDIzOjUzICswMzAwLCBBbmR5IFNoZXZjaGVua28gd3JvdGU6 Cj4gTGV0IHRoZSBrcmVhbGxvY19hcnJheSgpIGNvcHkgdGhlIG9yaWdpbmFsIGRhdGEgYW5kCj4g Y2hlY2sgZm9yIGEgbXVsdGlwbGljYXRpb24gb3ZlcmZsb3cuCj4gCj4gU2lnbmVkLW9mZi1ieTog QW5keSBTaGV2Y2hlbmtvIDxhbmRyaXkuc2hldmNoZW5rb0BsaW51eC5pbnRlbC5jb20+Cj4gLS0t Cj4gwqBkcml2ZXJzL2lpby9pbmR1c3RyaWFsaW8tY29yZS5jIHwgMjAgKysrKysrKy0tLS0tLS0t LS0tLS0KPiDCoDEgZmlsZSBjaGFuZ2VkLCA3IGluc2VydGlvbnMoKyksIDEzIGRlbGV0aW9ucygt KQo+IAo+IGRpZmYgLS1naXQgYS9kcml2ZXJzL2lpby9pbmR1c3RyaWFsaW8tY29yZS5jIGIvZHJp dmVycy9paW8vaW5kdXN0cmlhbGlvLWNvcmUuYwo+IGluZGV4IDkwZTU5MjIzYjE3OC4uYmUxNTQ4 Nzk5ODNlIDEwMDY0NAo+IC0tLSBhL2RyaXZlcnMvaWlvL2luZHVzdHJpYWxpby1jb3JlLmMKPiAr KysgYi9kcml2ZXJzL2lpby9pbmR1c3RyaWFsaW8tY29yZS5jCj4gQEAgLTE0NjUsNyArMTQ2NSw3 IEBAIGludCBpaW9fZGV2aWNlX3JlZ2lzdGVyX3N5c2ZzX2dyb3VwKHN0cnVjdCBpaW9fZGV2Cj4g KmluZGlvX2RldiwKPiDCoMKgwqDCoMKgwqDCoMKgY29uc3Qgc3RydWN0IGF0dHJpYnV0ZV9ncm91 cC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