Whamcloud - gitweb
LU-17193 build: fix gcc-12 compiler warnings
[fs/lustre-release.git] / lustre / include / uapi / linux / lustre / lustre_idl.h
index 044361a..d2eb486 100644 (file)
@@ -1549,11 +1549,7 @@ struct obd_quotactl {
 
 #define Q_COPY(out, in, member) (out)->member = (in)->member
 
-/* NOTE:
- * - in and out maybe a type of struct if_quotactl or struct obd_quotactl
- * - in and out need not be of the same type.
- */
-#define __QCTL_COPY(out, in, need_pname)                               \
+#define QCTL_COPY_NO_PNAME(out, in)                                    \
 do {                                                                   \
        Q_COPY(out, in, qc_cmd);                                        \
        Q_COPY(out, in, qc_type);                                       \
@@ -1561,7 +1557,16 @@ do {                                                                     \
        Q_COPY(out, in, qc_stat);                                       \
        Q_COPY(out, in, qc_dqinfo);                                     \
        Q_COPY(out, in, qc_dqblk);                                      \
-       if (need_pname && LUSTRE_Q_CMD_IS_POOL(in->qc_cmd)) {           \
+} while (0)
+
+/* NOTE:
+ * - in and out maybe a type of struct if_quotactl or struct obd_quotactl
+ * - in and out need not be of the same type.
+ */
+#define QCTL_COPY(out, in)                                             \
+do {                                                                   \
+       QCTL_COPY_NO_PNAME(out, in);                                    \
+       if (LUSTRE_Q_CMD_IS_POOL(in->qc_cmd)) {                         \
                size_t len = strnlen(in->qc_poolname, LOV_MAXPOOLNAME); \
                                                                        \
                memcpy(out->qc_poolname, in->qc_poolname, len);         \
@@ -1569,9 +1574,6 @@ do {                                                                      \
        }                                                               \
 } while (0)
 
-#define QCTL_COPY(out, in) __QCTL_COPY(out, in, true)
-#define QCTL_COPY_NO_PNAME(out, in) __QCTL_COPY(out, in, false)
-
 /* Body of quota request used for quota acquire/release RPCs between quota
  * master (aka QMT) and slaves (ak QSD). */
 struct quota_body {