From patchwork Fri Jul 15 15:02:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sreekanth Reddy X-Patchwork-Id: 12919337 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9177FC433EF for ; Fri, 15 Jul 2022 14:50:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229715AbiGOOuU (ORCPT ); Fri, 15 Jul 2022 10:50:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229475AbiGOOuR (ORCPT ); Fri, 15 Jul 2022 10:50:17 -0400 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CB4978206 for ; Fri, 15 Jul 2022 07:50:17 -0700 (PDT) Received: by mail-pf1-x432.google.com with SMTP id x184so4864394pfx.2 for ; Fri, 15 Jul 2022 07:50:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version; bh=MAq9bdFPZEztINhBs377/UURzilqB6/S2TiDwQDnmGo=; b=Qfb7zZP4FXTiSUruI7kFrytv46/Uolosob7eFWWCA5Tv0CkHP6XafRPVFxAqEcdoHu b9dBULmfjVjY5Y8h368ZfGg0E/FyLbtYBM2HlQxIPhfCM65LfcDmS3onYIL2/vgjQamt dMFjflPZUZBYuJPuQsBmk81MYDHLHbbGJ142c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version; bh=MAq9bdFPZEztINhBs377/UURzilqB6/S2TiDwQDnmGo=; b=RiEAm73hyg2jENDIboyrclTL7Anvl8g2UDxTSQtFDjj9IdW7kBmrFg+wJf46aSLNZH cNgZ+sk6hh97326xctyBg5l4uXNr6QsV1c+SEnu5Rgk0yV9ZTKEJsGlcRmZvb7kjH8Tt k/djVnbRKFpbOiEjXZY+EWdqFBSJ8NJ6uUzf76O4heB/nwDGsxHCUQC7rn500NJWw5+z FV3VIJ4xXTHm7UG3YtbnUC5T9LTMQxTJbozHcazlpPOMTzxHmRioksWqrwcrKDluhw5s SWcX8MpYyAs8dR6rDKtxlEWMykVxkAh0NZYv0wVNjVyk88feNNGzJfaD6XYCITQBuXV2 TEVg== X-Gm-Message-State: AJIora/kxP0Leb6b28N1oiXkigrx9a7TE5prqjmGWSnVLL4D9Tx9Ae06 /ozV1vp2EbYVga07Na00kC3LFlAwAyQ+KPbu0H5IsIU0IgbztltFwSXbQmCFsSFmDpoiha2VlhZ IIofsCXub4UxniGQxvjC8p4WnYRhhpxDT46YYHcNnRExtW34rI5KerSfSdDPM8HaZ0n2YEBIhC0 I/YKmW+vA3dD0= X-Google-Smtp-Source: AGRyM1tRyBtuEmVHh2PjYclkO3WKEVbscZl1MOZ4kzxKsXdhIFml4ndPKGsMa76OXiQmBIRHUA/Htw== X-Received: by 2002:a63:eb0c:0:b0:415:c521:4bf with SMTP id t12-20020a63eb0c000000b00415c52104bfmr12163456pgh.25.1657896616402; Fri, 15 Jul 2022 07:50:16 -0700 (PDT) Received: from dhcp-10-123-20-36.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id g5-20020a170902d1c500b0016bd72887fcsm3578075plb.59.2022.07.15.07.50.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jul 2022 07:50:15 -0700 (PDT) From: Sreekanth Reddy To: linux-scsi@vger.kernel.org Cc: martin.petersen@oracle.com, Sreekanth Reddy , Guenter Roeck Subject: [PATCH 1/1] mpi3mr: Fix compilation errors observed on i386 arch Date: Fri, 15 Jul 2022 20:32:19 +0530 Message-Id: <20220715150219.16875-2-sreekanth.reddy@broadcom.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220715150219.16875-1-sreekanth.reddy@broadcom.com> References: <20220715150219.16875-1-sreekanth.reddy@broadcom.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Fix below compilation errors observed on i386 ARCH, cast from pointer to integer of different size [-Werror=pointer-to-int-cast] Fixes: c196bc4dce ("scsi: mpi3mr: Reduce VD queue depth on detecting throttling") Reported-by: Guenter Roeck Signed-off-by: Sreekanth Reddy Reported-by: kernel test robot --- drivers/scsi/mpi3mr/mpi3mr_os.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c index 0901bc932d5c..d8013576d863 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_os.c +++ b/drivers/scsi/mpi3mr/mpi3mr_os.c @@ -386,7 +386,7 @@ static void mpi3mr_queue_qd_reduction_event(struct mpi3mr_ioc *mrioc, ioc_warn(mrioc, "failed to queue TG QD reduction event\n"); return; } - *(__le64 *)fwevt->event_data = (__le64)tg; + memcpy(fwevt->event_data, (char *)&tg, sizeof(u64)); fwevt->mrioc = mrioc; fwevt->event_id = MPI3MR_DRIVER_EVENT_TG_QD_REDUCTION; fwevt->send_ack = 0; @@ -1660,8 +1660,7 @@ static void mpi3mr_fwevt_bh(struct mpi3mr_ioc *mrioc, { struct mpi3mr_throttle_group_info *tg; - tg = (struct mpi3mr_throttle_group_info *) - (*(__le64 *)fwevt->event_data); + memcpy((char *)&tg, fwevt->event_data, sizeof(u64)); dprint_event_bh(mrioc, "qd reduction event processed for tg_id(%d) reduction_needed(%d)\n", tg->id, tg->need_qd_reduction);