aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/net/lib/py
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <[email protected]>2025-01-14 19:06:12 +0000
committerStephen Boyd <[email protected]>2025-01-15 20:27:04 +0000
commitab9f0d04ffa9af09a8b0f44940df47c581f1cd00 (patch)
tree8c20ee808bf4ab84cea95aa5bafe617387a9f7ff /tools/testing/selftests/net/lib/py
parentclk: clk-loongson2: Switch to use devm_clk_hw_register_fixed_rate_parent_data() (diff)
downloadkernel-ab9f0d04ffa9af09a8b0f44940df47c581f1cd00.tar.gz
kernel-ab9f0d04ffa9af09a8b0f44940df47c581f1cd00.zip
clk: Use str_enable_disable-like helpers
Replace ternary (condition ? "enable" : "disable") syntax with helpers from string_choices.h because: 1. Simple function call with one argument is easier to read. Ternary operator has three arguments and with wrapping might lead to quite long code. 2. Is slightly shorter thus also easier to read. 3. It brings uniformity in the text - same string. 4. Allows deduping by the linker, which results in a smaller binary file. Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
Diffstat (limited to 'tools/testing/selftests/net/lib/py')
0 files changed, 0 insertions, 0 deletions
id='n56' href='#n56'>56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194
/* ops.h - Internal operation support.
   Copyright (C) 2000 Werner Koch (dd9jn)
   Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH

   This file is part of GPGME.

   GPGME is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as
   published by the Free Software Foundation; either version 2.1 of
   the License, or (at your option) any later version.

   GPGME is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
   02111-1307, USA.  */

#ifndef OPS_H
#define OPS_H

#include "gpgme.h"
#include "context.h"


/* From gpgme.c.  */
gpgme_error_t _gpgme_cancel_with_err (gpgme_ctx_t ctx, gpg_error_t ctx_err,
				      gpg_error_t op_err);
/* Clear all notation data from the context.  */
void _gpgme_sig_notation_clear (gpgme_ctx_t ctx);

void _gpgme_release_result (gpgme_ctx_t ctx);


/* From wait.c.  */
gpgme_error_t _gpgme_wait_one (gpgme_ctx_t ctx);
gpgme_error_t _gpgme_wait_one_ext (gpgme_ctx_t ctx, gpgme_error_t *op_err);
gpgme_error_t _gpgme_wait_on_condition (gpgme_ctx_t ctx, volatile int *cond,
					gpgme_error_t *op_err);


/* From data.c.  */
gpgme_error_t _gpgme_data_inbound_handler (void *opaque, int fd);
gpgme_error_t _gpgme_data_outbound_handler (void *opaque, int fd);


/* From op-support.c.  */

/* Find or create the op data object of type TYPE.  */
gpgme_error_t _gpgme_op_data_lookup (gpgme_ctx_t ctx, ctx_op_data_id_t type,
				     void **hook, int size,
				     void (*cleanup) (void *));

/* Prepare a new operation on CTX.  */
gpgme_error_t _gpgme_op_reset (gpgme_ctx_t ctx, int synchronous);

/* Parse the KEY_CONSIDERED status line.  */
gpgme_error_t _gpgme_parse_key_considered (const char *args,
                                           char **r_fpr, unsigned int *r_flags);

/* Parse the INV_RECP status line in ARGS and return the result in
   KEY.  */
gpgme_error_t _gpgme_parse_inv_recp (char *args, int for_signing,
                                     const char *kc_fpr, unsigned int kc_flags,
                                     gpgme_invalid_key_t *key);

/* Parse the PLAINTEXT status line in ARGS and return the result in
   FILENAMEP.  */
gpgme_error_t _gpgme_parse_plaintext (char *args, char **filenamep);

/* Parse a FAILURE status line and return the error code.  ARGS is
   modified to contain the location part.  */
gpgme_error_t _gpgme_parse_failure (char *args);



/* From verify.c.  */
gpgme_error_t _gpgme_op_verify_init_result (gpgme_ctx_t ctx);
gpgme_error_t _gpgme_verify_status_handler (void *priv,
					    gpgme_status_code_t code,
					    char *args);


/* From decrypt.c.  */